#include #include using namespace std; main() { list lines; list ::reverse_iterator lit; string s; while (!cin.eof()) { getline(cin, s); if (!cin.eof()) lines.push_back(s); } for (lit = lines.rbegin(); lit != lines.rend(); lit++) { cout << *lit << endl; } }