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

public class Gen {

	static int done = 0;

	static final Random rand = new Random(556668949239L);
	static final int MAX_COUNT = 10;
	static final int MAX_LENGTH = 9;
	static final int MAX_VALUE = (int) 1e9;

	static void print(String s) throws IOException {
		done++;
		System.err.println(done);
		PrintWriter out;
		if (done < 10)
			out = new PrintWriter("../tests/0" + String.valueOf(done));
		else
			out = new PrintWriter("../tests/" + String.valueOf(done));

		out.println(s);
		out.close();
	}

	final static String ALPHA = "abcdefghijklmnopqrstuvwxyz";
	final static String ALPHA_EXT = ALPHA;// + ALPHA.toUpperCase();

	static String randString(int len, String alpha) {
		StringBuilder ans = new StringBuilder();
		int k = alpha.length();
		for (int i = 0; i < len; i++) {
			ans.append(alpha.charAt(rand.nextInt(k)));
		}
		return ans.toString();
	}

	long rand(long l, long r) {
		return l + (rand.nextLong() >>> 1) % (r - l + 1);
	}

	static int rand(int l, int r) {
		return l + rand.nextInt(r - l + 1);
	}

	final static int MAXN = 500000;

	static void saveNoisyTest(String s) throws IOException {
		print(addNoise(s, rand.nextDouble() * 10 / s.length()));
	}

	static void saveTest(String s) throws IOException {
		print(s);
	}

	static void genRand(int n) throws IOException {
		saveTest(randString(n, ALPHA_EXT));
	}

	static String addNoise(String s, double q) {
		StringBuilder sb = new StringBuilder();
		for (char c : s.toCharArray()) {
			if (rand.nextDouble() < q) {
				sb.append(randString(1, ALPHA_EXT));
			} else {
				sb.append(c);
			}
		}
		return sb.toString();
	}

	static String mul(String s, int k) {
		StringBuilder sb = new StringBuilder();
		for (int i = 0; i < k; ++i) {
			sb.append(s);
		}
		return sb.toString();
	}

	static String addLen(String s, int n) {
		int m = n - s.length();
		int f = rand(0, m);
		String ans = randString(f, ALPHA_EXT) + s
				+ randString(m - f, ALPHA_EXT);
		return ans;
	}

	static void genPeriodic(int p, int k) throws IOException {
		String q = randString(p, ALPHA_EXT);
		String s = mul(q, k);
		saveTest(s);
	}

	static void genNoisyPeriodic(int p, int k) throws IOException {
		String q = randString(p, ALPHA_EXT);
		String s = mul(q, k);
		saveNoisyTest(s);
	}

	public static void solve() throws IOException {
		for (int i = 1; i <= 10; ++i) {
			int len = i * MAXN / 10;
			genRand(rand(len / 2, len));
			int k = rand(1, 20);
			genPeriodic(k, len / k);
			k = rand(1, 20);
			genNoisyPeriodic(k, len / k);
		}
		genRand(MAXN);
		genPeriodic(1, MAXN);
		genNoisyPeriodic(1, MAXN);
		genNoisyPeriodic(5, MAXN / 5);
		genPeriodic(2, MAXN / 2);
		genPeriodic(5, MAXN / 5);
		genPeriodic(MAXN / 10, 10);
		genPeriodic(MAXN / 1000, 1000);
	}

	public static void main(String[] args) throws IOException {
		File dir = new File("../tests");
		if (!dir.exists())
			dir.mkdir();
		done = 0;
		print("abcabc");
        print("aaaaa");
		print("ababa");
		solve();
		return;
	}
}

