import std.experimental.all; T read(T)() { return readln.chomp.to!T; } T[] reads(T)() { return readln.split.to!(T[]); } alias readint = read!int; alias readints = reads!int; void calc1(int n) { // 2^17 > 100_000 for (int i = 0; i < n-1; i++) { write('a'); for (int j = 0; j < 17; j++) { if (i & (1 << j)) write('a'); else write('b'); } writeln('a'); } writeln("an"); } void calc2(int n) { auto cs = lowercase; // 26^4 > 100_000 foreach (a, b, c, d; cartesianProduct(cs, cs, cs, cs).take(n-1)) { writeln('a', a, b, c, d, 'a'); } writeln("an"); } void main() { int n = readint; calc2(n); }