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

public class building_gk {
    static Scanner in;
    static PrintWriter out;

    char chr(int n) {
        return (char) ((n < 26) ? 'a' + n : 'A' + n - 26);
    }

    void run() {
        int n = in.nextInt();
        out.format("2 %d %d\n", n, n);
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < n; j++) {
                out.print(chr(j));
            }
            out.println();
        }
        out.println();
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < n; j++) {
                out.print(chr(i));
            }
            out.println();
        }
    }

    public static void main(String[] args) throws IOException {
        in = new Scanner(System.in);
        out = new PrintWriter(System.out);

        new building_gk().run();

        out.close();
        in.close();
    }
}
