/*--------------------------------------------------------------*/
/* ACM ICPC 2007-2008                                           */
/* Northeastern European Regional Contest                       */
/* St Petersburg - Barnaul - Tashkent - Batumi, November 28, 200*/
/*--------------------------------------------------------------*/
/* Problem B. Building for UN                                   */
/*--------------------------------------------------------------*/
/* Solution                                                     */
/*                                                              */
/* Author                Michael Dvorkin                        */
/*--------------------------------------------------------------*/
 
import java.io.*;
import java.util.*;

public class building_md implements Runnable {
	private Scanner in;
	private PrintWriter out;

	public void run() {
		try {
			solve();
		} catch (IOException e) {
			e.printStackTrace();
			System.exit(1);
		}
	}

	private void solve() throws IOException {
		Locale.setDefault(Locale.US);
		in = new Scanner(System.in);
		out = new PrintWriter(System.out);
		int n = in.nextInt();
		ArrayList<String> a = new ArrayList<String>();
		ArrayList<String> b = new ArrayList<String>();
		String s = "";
		for (char c = 'A'; c <= 'Z'; c++)
			s += c;
		for (char c = 'a'; c <= 'z'; c++)
			s += c;
		s = s.substring(0, n);
		StringBuilder x = new StringBuilder(s);
		while (true) {
			StringBuilder y1 = new StringBuilder();
			StringBuilder y2 = new StringBuilder();
			StringBuilder z = new StringBuilder();
			boolean ch = false;
			for (int i = 0; i < n;) {
				if (i < n - 1 && x.charAt(i) < x.charAt(i + 1)) {
					ch = true;
					y1.append(x.charAt(i));
					y1.append(x.charAt(i));
					y2.append(x.charAt(i + 1));
					y2.append(x.charAt(i + 1));
					z.append(x.charAt(i + 1));
					z.append(x.charAt(i));
					i += 2;
				} else {
					y1.append(x.charAt(i));
					y2.append(x.charAt(i));
					z.append(x.charAt(i));
					i++;
				}
			}
			a.add(x.toString());
			a.add(y1.toString());
			b.add(x.toString());
			b.add(y2.toString());
			x = z;
			if (!ch)
				break;
		}
		out.println(2 + " " + n + " " + 2 * n);
		for (int i = 0; i < 2 * n; i++)
			out.println(a.get(i));
		out.println();
		for (int i = 0; i < 2 * n; i++)
			out.println(b.get(i));
		in.close();
		out.close();
	}

	public static void main(String[] args) {
		new Thread(new building_md()).start();
	}
}
