// cardwords_sgml2helptext.cc

// This prog parses a text files and concatenates all sequences of non-empty
// lines to a single line.

#include <string>
int
main(int, char**)
{
  string last_line;
  string this_line;

  if (cin) {
    getline(cin, last_line);
    if (*last_line.rbegin() == '\n') {
      last_line.resize(last_line.size()-1);
    }
  }
  while (cin) {
    getline(cin, this_line);

    if (*this_line.rbegin() == '\n') {
      this_line.resize(this_line.size()-1);
    }

    if (this_line.size() == 0) {
      if (last_line.size() != 0) {
        cout << last_line << endl;
        last_line = "";
      }
      cout << endl;
    }
    else {
      last_line += " " + this_line;
    }
  }
  if (last_line.size() != 0) {
    cout << last_line << endl;
  }
  return 0;
}
