#include <iostream>
#include <string>

using namespace std;

bool
read_line(string & line, istream & in)
{
   bool ret = false;
   char ch;
   line = "";
   ch = in.get();
   while(in) {
      ret = true;
      if(ch == '\r' || ch == '\n') break;
      line += ch;
      ch = in.get();
   }
   return ret;
}

int
main()
{
   string line;
   int count = 0;
   while(read_line(line, cin)) {
      if(line != "") {
         cout << line << endl << flush;
         count = 0;
      }
      else {
         if(count) {
            cout << endl << flush;
            count = 0;
         }
         count++;
      }
   }
   return 0;
}