#include using namespace std; using i64 = long long; #define rep(i,s,e) for(int (i) = (s);(i) <= (e);(i)++) int N; int rec(char c,string s,int cnt){ if(cnt == 0){ cout << c << s; N--; if(N == 0) cout << 'n' << endl; else cout << c << endl; return 0; } for(char a = 'a';a <= 'z';a++){ s.push_back(a); rec(c,s,cnt - 1); s.pop_back(); if(N == 0) return 0; } return 0; } int main(){ cin >> N; rec('a',string(),18); }