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


public class gen_max_test {

	final static int MAX_N = 100;
	final static int MAX_M = 1000;
	static Random rand;
	
	public static int randomInt(Random rand, int modulo) {
		return java.lang.Math.abs(rand.nextInt()) % modulo + 1;
	}
	
	public static String RandomStr(int len) {
		String res = "";
		for(int i = 0; i < len; ++i) {
			res = res + (char)(randomInt(rand, 25) + 'a');
		}
		return res;
	}
	
	public static void main(String[] args) {
		PrintWriter out = new PrintWriter(System.out);
		
		rand = new Random();
		int n = 100;
		out.println(n);
		ArrayList<String> types = new ArrayList<String>();
		for(int i = 0; i < n; ++i) {
			String tmp = RandomStr(30);
			types.add(tmp);
			out.println(tmp + " " + Integer.MAX_VALUE);
		}
		int m = 1000;
		out.println(m);
		for(int i = 0; i < m; ++i) {
			String tmp = RandomStr(30);
			out.print(types.get(rand.nextInt(n)) + " " + tmp);
			int dim = 50;
			for(int j = 0; j < dim; ++j) {
				out.print("[" + 1000 + "]");
			}
			out.println(";");
		}

		out.close();
	}

}