import java.io.IOException;
import java.io.PrintWriter;
import java.util.Random;

public class TestGen extends Thread {

	private int testCount = 0;

	private void write(String s) {
		try {
			++testCount;
			PrintWriter out = new PrintWriter(testCount / 10 + "" + testCount
					% 10);
			System.err.println(testCount);
			out.println(s);
			out.flush();
			out.close();
		} catch (IOException ex) {
			throw new RuntimeException(ex);
		}
	}

	void myAssert(boolean b) {
		if (!b)
			throw new AssertionError();
	}

	Random rand;
	final String[] example = { "array", "computer", "sis" };
	final String[] hand = {};

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

	String reverse(String s) {
		return new StringBuilder(s).reverse().toString();
	}

	String shiftLeft(String s, int sh) {
		sh = sh % s.length();
		return s.substring(sh) + s.substring(0, sh);
	}

	String shiftRight(String s, int sh) {
		return shiftLeft(s, s.length() - sh);
	}

	String abacaba(int k) {
		String s = "";
		for (int i = 0; i < k; i++) {
			s = s + (char) ('a' + i) + s;
		}
		return s;
	}

	char randomChar(int alphabet) {
		return (char) ('a' + rand.nextInt(alphabet));
	}

	String randomPalin(int len, int alphabet) {
		StringBuilder sb = new StringBuilder();
		for (int i = 0; i < len / 2; i++) {
			sb.append(randomChar(alphabet));
		}
		String q = sb.toString();
		if (len % 2 == 1) {
			sb.append(randomChar(alphabet));
		}
		sb.append(reverse(q));
		return sb.toString();
	}

	boolean isPalindrom(String s) {
		for (int i = 0; i < s.length() / 2; i++) {
			if (s.charAt(i) != s.charAt(s.length() - i - 1)) {
				return false;
			}
		}
		return true;
	}

	boolean isCyclePalindrom(String s) {
		for (int i = 0; i < s.length(); i++) {
			String a = s.substring(i);
			String b = s.substring(0, i);
			if (isPalindrom(a + b)) {
				return true;
			}
		}
		return false;
	}

	String randomString(int len, int alphabet) {
		StringBuilder sb = new StringBuilder();
		for (int i = 0; i < len; i++) {
			sb.append(randomChar(alphabet));
		}
		return sb.toString();
	}

	String randomOnlyPalin(int len, int alphabet) {
		if (len % 2 == 0)
			throw new Error("only palindrom of even length don't exist");
		wh: while (true) {
			String s = randomPalin(len, alphabet);
			// System.err.println(s);
			for (int i = 1; i < s.length(); i++) {
				String a = s.substring(i);
				String b = s.substring(0, i);
				if (isPalindrom(a + b)) {
					// System.err.println(a+b+" - palin "+i);
					continue wh;
				}
			}
			return s;
		}
	}

	String randomNoPalin(int len, int alphabet) {
		while (true) {
			String s = randomString(len, alphabet);
			if (!isCyclePalindrom(s))
				return s;
		}
	}

	String randomPalinBroken(int len, int alphabet, int k) {
		StringBuilder sb = new StringBuilder(randomPalin(len, alphabet));
		int l = len / 2;
		int r = l + 1;
		if (len % 2 == 1) {
			r++;
		}
		while (sb.charAt(l) == sb.charAt(r)) {
			sb.setCharAt(l, randomChar(alphabet));
		}
		return sb.toString();
	}

	public void run() {
		rand = new Random(1);
		for (int i = 0; i < example.length; i++) {
			write(example[i]);
		}
		for (int i = 0; i < hand.length; i++) {
			write(hand[i]);
		}
		write(repeat("a", 1));
		write(repeat("z", 1));
		write(repeat("s", 100));
		write(repeat("z", 100));
		write(randomPalin(10, 10));
		write(randomPalin(10, 26));
		write(randomPalin(100, 10));
		write(randomPalin(100, 26));
		write(randomPalin(99, 26));
		write(shiftLeft(randomPalin(100, 26), 1));
		write(shiftRight(randomPalin(100, 26), 1));
		write(shiftLeft(randomPalin(100, 26), 2));
		write(shiftRight(randomPalin(100, 26), 2));
		write(shiftLeft(randomOnlyPalin(99, 26), 1));
		write(shiftRight(randomOnlyPalin(99, 26), 1));
		write(shiftLeft(randomOnlyPalin(99, 26), 2));
		write(shiftRight(randomOnlyPalin(99, 26), 2));
		String s = randomOnlyPalin(3, 26);
		write(s);
		write(shiftRight(s, 1));
		write(shiftRight(s, 2));

		write(randomNoPalin(100, 26));
		write(randomNoPalin(99, 26));
		write(randomNoPalin(2, 26));
		write(randomNoPalin(3, 26));
		
		
		write(shiftLeft(randomOnlyPalin(99, 26), rand.nextInt(99)));
		write(shiftLeft(randomOnlyPalin(99, 26), rand.nextInt(99)));
	}

	public static void main(String[] args) throws IOException {
		new TestGen().start();
	}
}
