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

public class GenTests {

	PrintWriter out;
	Random rnd;
	int tNumber;
	final int ALPHABET = 'z' - 'a' + 1;

	class Test {
		String encryption;

		void printTest() throws IOException {
			if (tNumber < 10)
				out = new PrintWriter("../tests/0" + tNumber);
			else
				out = new PrintWriter("../tests/" + tNumber);
			tNumber++;
			out.println(encryption.length());
			out.println(encryption);
			out.close();
		}

		boolean isVowel(char c) {
			c = Character.toLowerCase(c);
			if (Character.isAlphabetic(c)
					&& (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u'))
				return true;
			return false;
		}

		private char rndLowerCaseVowel() {
			char c = (char) ('a' + rnd.nextInt(ALPHABET));
			while (!isVowel(c)) {
				c = (char) ('a' + rnd.nextInt(ALPHABET));
				;
			}
			return c;
		}

		private char rndLowerCaseConsonant() {
			char c = (char) ('a' + rnd.nextInt(ALPHABET));
			while (isVowel(c)) {
				c = (char) ('a' + rnd.nextInt(ALPHABET));
				;
			}
			return c;
		}

		private char rndVowel() {
			char c = (char) ('a' + rnd.nextInt(ALPHABET));
			while (!isVowel(c)) {
				c = (char) ('a' + rnd.nextInt(ALPHABET));
			}
			if (rnd.nextBoolean()) {
				return Character.toLowerCase(c);
			}
			return Character.toUpperCase(c);
		}

		private char rndConsonant() {
			char c = (char) ('a' + rnd.nextInt(ALPHABET));
			while (isVowel(c)) {
				c = (char) ('a' + rnd.nextInt(ALPHABET));
			}
			if (rnd.nextBoolean()) {
				return Character.toLowerCase(c);
			}
			return Character.toUpperCase(c);
		}

		private char rndUpperCaseVowel() {
			char c = (char) ('A' + rnd.nextInt(ALPHABET));
			while (!isVowel(c)) {
				c = (char) ('A' + rnd.nextInt(ALPHABET));
				;
			}
			return c;
		}

		private char rndUpperCaseConsonant() {
			char c = (char) ('A' + rnd.nextInt(ALPHABET));
			while (isVowel(c)) {
				c = (char) ('A' + rnd.nextInt(ALPHABET));
				;
			}
			return c;
		}

		private char rndLetter() {
			int temp = rnd.nextInt(ALPHABET * 2);
			char c;
			if (temp >= ALPHABET) {
				c = (char) ('a' + temp - ALPHABET);
			} else {
				c = (char) ('A' + (temp % ALPHABET));
			}
			return c;
		}

		private char rndUpperCase() {
			return (char) ('A' + rnd.nextInt(ALPHABET));
		}

		private char rndLowerCase() {
			return (char) ('a' + rnd.nextInt(ALPHABET));
		}

		void genSample() throws IOException {
			encryption = "GoodLuck";
			printTest();
		}

		void genTestString(String s) throws IOException {
			encryption = s;
			printTest();
		}
		
		void genNullTestLowerConsonant(int n) throws IOException {
			char[] res = new char[n];
			for (int i = 0; i < n; i++) {
				res[i] = rndLowerCaseConsonant();
			}
			encryption = new String(res);
			printTest();
		}
		void genNullTestUpperConsonant(int n) throws IOException {
			char[] res = new char[n];
			for (int i = 0; i < n; i++) {
				res[i] = rndUpperCaseConsonant();
			}
			encryption = new String(res);
			printTest();
		}
		void genNullTestConsonant(int n) throws IOException {
			char[] res = new char[n];
			for (int i = 0; i < n; i++) {
				res[i] = rndConsonant();
			}
			encryption = new String(res);
			printTest();
		}
		
		void genTestVowel(int n) throws IOException {
			char[] res = new char[n];
			for (int i = 0; i < n; i++) {
				res[i] = rndVowel();
			}
			encryption = new String(res);
			printTest();
		}
		
		void genTestUpperVowel(int n) throws IOException {
			char[] res = new char[n];
			for (int i = 0; i < n; i++) {
				res[i] = rndUpperCaseVowel();
			}
			encryption = new String(res);
			printTest();
		}
		
		void genTestLowerVowel(int n) throws IOException {
			char[] res = new char[n];
			for (int i = 0; i < n; i++) {
				res[i] = rndLowerCaseVowel();
			}
			encryption = new String(res);
			printTest();
		}
		
		void genTestLower(int n) throws IOException {
			char[] res = new char[n];
			for (int i = 0; i < n; i++) {
				res[i] = rndLowerCase();
			}
			encryption = new String(res);
			printTest();
		}
		
		void genTestUpper(int n) throws IOException {
			char[] res = new char[n];
			for (int i = 0; i < n; i++) {
				res[i] = rndUpperCase();
			}
			encryption = new String(res);
			printTest();
		}
		
		void genTestAll(int n) throws IOException {
			char[] res = new char[n];
			for (int i = 0; i < n; i++) {
				res[i] = rndLetter();
			}
			encryption = new String(res);
			printTest();
		}
		
	}

	public void solve() throws IOException {
		tNumber = 1;
		rnd = new Random(31321);

		Test t = new Test();
		t.genSample();
		t.genTestString("bab");
		t.genTestString("cjklsacdfgh");
		t.genTestString("zhqwrtzxcqwtynbcxi");
		t.genTestString("aBacAbA");
		t.genTestString("asddXsddAxcFqwodsA");
		t.genTestAll(10);
		t.genTestAll(20);
		t.genNullTestConsonant(100);
		t.genNullTestLowerConsonant(50);
		t.genNullTestUpperConsonant(50);
		t.genTestVowel(100);
		t.genTestUpperVowel(50);
		t.genTestLowerVowel(50);
		t.genTestUpper(50);
		t.genTestLower(50);
		t.genTestAll(200);
		
		for (int i = 0; i < 3; i++) {
			t.genTestAll(1000 + rnd.nextInt(1000));
			t.genTestVowel(1000 + rnd.nextInt(1000));
		}
		for (int i = 0; i < 3; i++) {
			t.genTestAll(5000 + rnd.nextInt(1000));
			t.genTestVowel(5000 + rnd.nextInt(1000));
		}
		for (int i = 0; i < 3; i++) {
			t.genTestAll(10000 + rnd.nextInt(4000));
			t.genTestVowel(10000 + rnd.nextInt(4000));
		}
		for (int i = 0; i < 6; i++) {
			t.genTestAll(15000 + rnd.nextInt(1000));   
  		}
		
		for (int i = 0; i < 2; i++) {
			t.genTestVowel(20000 - rnd.nextInt(10));
		}
		for (int i = 0; i < 5; i++) {
			t.genNullTestConsonant(20000 - rnd.nextInt(10));
		}
		for (int i = 0; i < 3; i++) {
			t.genTestAll(20000 - rnd.nextInt(10));
		}
		for (int i = 0; i < 3; i++) {
			t.genTestAll(20000);
		}

	}

	public void run() {
		try {

			solve();

		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	public static void main(String[] args) {
		new GenTests().run();
	}
}
