void main() {
	uint n;

	readf(" %s", %n);

	if (n == 1) {
		writeln("a");
		return;
	}
	if (n == 2) {
		writeln("aa\nab");
		return;
	}
	if (n == 3) {
		writeln("aaa");
		writeln("aab");
		writeln("aba");
		writeln("abb");
		writeln("abc");
	}
	
	throw new Exception("");
}
