#include using namespace std; int main() { random_device rnd; string s; set st; int n; cin >> n; if (n == 1) { cout << 'n' << endl; return 0; } { for (int i = 0; i < 15; i++) { s += 'a' + rnd() % 26; } while (s[14] == 'n') { s[14] = 'a' + rnd() % 26; } cout << s << endl; st.insert(s); } for (int i = 1; i < n - 1; i++) { string t(15, 'a'); t[0] = s[14]; while (st.find(t) != st.end()) { for (int j = 0; j < 15; j++) { t[j] = 'a' + rnd() % 26; } t[0] = s[14]; while (t[14] == 'n') { t[14] = 'a' + rnd() % 26; } } cout << t << endl; s = t; st.insert(s); } string t(15, 'a'); t[0] = s[14]; t[14] = 'n'; while (st.find(t) != st.end()) { for (int i = 1; i < 14; i++) { t[i] = 'a' + rnd() % 26; } } cout << t << endl; return 0; }