import java.util.*;

public class GenRandom {
	static String symbols = "qwertyuioplkjhgfdsazxcvbnm QWERTYUIOPLKJHGFDSAZXCVBNM";
	
	public static String randomString(Random r, int l) {
		String res = "";
		for(int i = 0; i < l; ++i) {
			res = res +  symbols.charAt(r.nextInt(symbols.length()));
		}
		return res;
	}
	
	public static void main(String[] args) {
		ArrayList<String> list = new ArrayList<String>();
		Random rand = new Random();
		int count = rand.nextInt(10000) + 1;
		for(int i = 0; i < count; ++i) {
			String name = randomString(rand, 30);
			list.add(name);
		}
		int p = 100000;
		int n = rand.nextInt(50000) + 50000;
		int k = Integer.parseInt(args[0]);
		System.out.println(p + " " + n + " " + k);
		for(int i = 0; i < p; ++i) {
			System.out.println(list.get(rand.nextInt(list.size())));
		}
		for(int i = 0; i < p; ++i) {
			System.out.print(Math.abs(rand.nextInt()) + " ");
		}
	}
} 