//* Problem  : B
//* Contest  : NEERC 2007
//* Type     : Solution
//* Date     : 2007.11.29
//* Author   : alt
//* Language : C++
//* Compiler : Microsoft Visual C++ 6.0

#include <stdio.h>
#include <math.h>
#include <string.h>
#include <stdlib.h>

int n;

char a[100][100][100];

void solve();
void result();

int main()
{
	scanf("%d", &n);
	solve();
	result();
	return 0;
}

char val(int v)
{
	if (v <= 25) return 'a' + v;
	return 'A' + v - 26;
}

void solve()
{
	int i, j, k;
	for (k = 0; k < n; k++)
	{
		char c = val(k);
		for (i = 0; i < n; i++)
			for (j = 0; j < n; j++)
				a[k][i][j] = c;
	}
	for (i = 0; i < n; i++)
		for (j = 0; j < n; j++)
			a[j][0][i] = val(i);
	printf("%d %d %d\n", n, n, n);
	for (k = 0; k < n; k++)
	{
		if (k) putchar('\n');
		for (i = 0; i < n; i++)
			printf("%s\n", a[k][i]);
	}
}

void result()
{
}

