#include <iostream>
#include <string>
#include <list>

using namespace std;

int main() {
  list<string> buffer;

  for (string line; getline(cin, line); )
    buffer.push_back(line);

  buffer.sort();

  while (!buffer.empty()) {
    cout << buffer.front() << endl;
    buffer.pop_front();
  }

  return 0;
}
