import java.io.*;
import java.util.*;

public class TestsGen implements Runnable {
  public static void main(String[] args) {
    new Thread(new TestsGen()).start();
  }

  BufferedReader br;
  PrintWriter out;
  StringTokenizer in;

  final int handTests = 7;
  final int numberOfTests = 50;

  public String nextToken() throws IOException {
    while (in == null || !in.hasMoreTokens()) {
      in = new StringTokenizer(br.readLine());
    }
    return in.nextToken();
  }

  public int nextInt() throws IOException {
    return Integer.parseInt(nextToken());
  }

  public long nextLong() throws IOException {
    return Long.parseLong(nextToken());
  }

  public double nextDouble() throws IOException {
    return Double.parseDouble(nextToken());
  }

  public class Test implements Comparable<Test> {
    ArrayList<String> data;

    public Test(int n, String s) {
      data = new ArrayList<String>();
      data.add(Integer.toString(n));
      data.add(s);
    }

    public int compareTo(Test o) {
      for (int i = 0; i < data.size(); i++) {
        if (o.data.size() < i)
          return -1;
        if (!data.get(i).equals(o.data.get(i))) {
          return data.get(i).compareTo(o.data.get(i));
        }
      }
      if (data.size() < o.data.size())
        return 1;
      return 0;
    }

    public void print(int testNumber) throws IOException {
      if (testNumber < 10)
        out = new PrintWriter("0" + Integer.toString(testNumber));
      else
        out = new PrintWriter(Integer.toString(testNumber));
      for (int i = 0; i < data.size(); i++)
        out.println(data.get(i));
      out.close();
    }
  }

  Random rnd = new Random(784);

  public int getInt(int l, int r) {
    int val = (rnd.nextInt() % (r - l + 1) + (r - l + 1)) % (r - l + 1);
    return val + l;
  }

  public Test genTest(int k) {
    int n;
    if (k < 5)
      n = getInt(5, 20);
    else
      n = getInt(30, 100);
    int l;
    String s = "";
    int cs = getInt(1, 4);
    if (cs == 1 && n != 100) {
      l = getInt(n + 1, 100);
    } else if (cs == 2){
      l = n;
    } else {
      l = getInt(1, n);
    }
    for (int i = 0; i < l; i++)
      s += (char) (getInt(0, 25) + 'a');
    Test cur = new Test(n, s);
    return cur;
  }

  public void run() {
    Locale.setDefault(Locale.US);
    try {
      ArrayList<Test> tests = new ArrayList<Test>();
      for (int i = 0; i < numberOfTests - handTests; i++) {
        tests.add(genTest(i));
      }
      Collections.sort(tests);
      for (int i = 0; i < tests.size(); i++)
        tests.get(i).print(i + handTests + 1);
    } catch (IOException e) {
      e.printStackTrace();
      System.exit(1);
    }

  }
}
