#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { string str; int n; cin >> n; vector<string> words; while (n--) { cin >> str; words.push_back(str); } // 排序 sort(words.begin(), words.end()); for (auto w : words) cout << w << endl; return 0; }