#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; const constexpr int INF = 1e9; #define FOR(i, a, n) for (ll i = (ll)a; i<(ll)n; ++i) #define REP(i, n) FOR(i, 0, n) typedef long long ll; typedef vector VI; typedef pair P; struct Less{ bool operator()(const pair&a, const pair&b){ if(a.first==b.first){ return a.second < b.second; } return a.first < b.first; } }; const constexpr ll MOD = 1e9; ll extGCD(ll a, ll b, ll& x, ll& y){ if(b==0){ x=1; y=0; return a; } ll d = extGCD(b, a%b, y, x); y -= a/b*x; return d; } ll GCD(ll a, ll b){ if(a v; for(int i=0; i<10; ++i){ v.push_back((char)'a'+i); } map mp; int n; cin >> n; int cnt=0; do{ string s; s+='a'; for(int i=0; i<8; ++i){ s+=v[i]; } s+='a'; if(mp[s]) continue; mp[s]++; cout << s << endl; cnt++; if(n==cnt) break; }while(next_permutation(v.begin(), v.end())); return 0; }