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

public class building_ia 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 {
		in = new Scanner(System.in);
		out = new PrintWriter(System.out);
		int n = in.nextInt();
		out.println(n + " " + n + " " + 2);
		for (int i = 0; i < n; i++) {
			for (int k = 0; k < n; k++) {
				out.print(toChar(k));
			}
			out.println();
			for (int k = 0; k < n; k++) {
				out.print(toChar(i));
			}
			out.println();
			out.println();
		}
		in.close();
		out.close();
	}
	
	private char toChar(int i) {
		return (char) ((i >= 26) ? ('A' + i - 26) : (i + 'a'));
	}


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

}
