Problem B. Building for UN

Author:ACM ICPC 2007-2008, Northeastern European Regional Contest   Time limit:3 sec
Input file:building.in   Memory limit:64 Mb
Output file:building.out  

Statement

The United Nations has decided to build a new headquarters in Saint Petersburg, Russia. It will have a form of a rectangular parallelepiped and will consist of several rectangular floors, one on top of another. Each floor is a rectangular grid of the same dimensions, each cell of this grid is an office. Two offices are considered adjacent if they are located on the same floor and share a common wall, or if one's floor is the other's ceiling.

The St. Petersburg building will host n national missions. Each country gets several offices that form a connected set.

Moreover, modern political situation shows that countries might want to form secret coalitions. For that to be possible, each pair of countries must have at least one pair of adjacent offices, so that they can raise the wall or the ceiling they share to perform secret pair-wise negotiations just in case they need to. You are hired to design an appropriate building for the UN.

Input file format

The input file consists of a single integer number n — the number of countries that are hosted in the building.

Output file format

On the first line of the output file write three integer numbers h, w, and l - height, width and length of the building respectively.

h descriptions of floors should follow. Each floor description consists of l lines with w characters on each line. Separate descriptions of adjacent floors with an empty line. Use capital and small Latin letters to denote offices of different countries. There should be at most 106 offices in the building. Each office should be occupied by a country. There should be exactly n different countries in the building. In this problem the required building design always exists.

Constraints

1 ≤ n ≤ 50

Sample tests

No. Input file (building.in) Output file (building.out)
1
4
2 2 2
AB
CC

zz
zz

0.084s 0.007s 13