import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    String N1[] = new String[1];
    String N2[] = new String[2];
    String N3[] = new String[5];

if(N==1){
System.out.println("a");");
return;
}
if(N==2){
System.out.println("aa");
System.out.println("ab");
return;
}
if(N==3){
System.out.println("aaa");
System.out.println("aab");
System.out.println("abb");
System.out.println("aba");
System.out.println("abc");
return;
}
if(N==4){
System.out.println("aaaa");
System.out.println("aaab");
System.out.println("aabb");
System.out.println("aaba");
System.out.println("abaa");
System.out.println("abab");
System.out.println("abba");
System.out.println("abbb");
System.out.println("aabc");
System.out.println("abac");
System.out.println("abbc");
System.out.println("abca");
System.out.println("abcb");
System.out.println("abcc");
System.out.println("abcd");
return;
}
if(N==5){
System.out.println("aaaaa");
System.out.println("aaaab");
System.out.println("aaaba");
System.out.println("aaabb");
System.out.println("aabaa");
System.out.println("aabab");
System.out.println("aabba");
System.out.println("aabbb");
System.out.println("abaaa");
System.out.println("abaab");
System.out.println("ababa");
System.out.println("ababb");
System.out.println("abbaa");
System.out.println("abbab");
System.out.println("abbba");
System.out.println("abbbb");
System.out.println("aaabc");
System.out.println("aabac");
System.out.println("aabbc");
System.out.println("aabca");
System.out.println("aabcc");
System.out.println("abaac");
System.out.println("ababc");
System.out.println("abaca");
System.out.println("abacb");
System.out.println("abacc");
System.out.println("abbac");
System.out.println("abbbc");
System.out.println("abbcc");
System.out.println("abccc");
System.out.println("aabcd");
System.out.println("abacd");
System.out.println("abcad");
System.out.println("abcda");
System.out.println("abcde");
return;
}

      
  }
  

  
}