/* -*- coding: utf-8 -*- * * 701.cc: No.701 ひとりしりとり - yukicoder */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; /* constant */ const int M = 4; /* typedef */ /* global variables */ char ds[M]; /* subroutines */ /* main */ int main() { int n; scanf("%d", &n); for (int i = 0; i < n; i++) { putchar('a'); for (int j = 0; j < M; j++) putchar('a' + ds[j]); putchar((i != n - 1) ? 'a' : 'n'); putchar('\n'); int k = 0; while (k < M) { if (++ds[k] < 26) break; ds[k++] = 0; } } return 0; }