Write a program that reads cubes of integer numbers and computes how many lines of size contains, for any between 2 and . Here, a line is a sequence of identical integer numbers adjacents in the same direction. The considered directions are vertical, horizontal, of depth, (in total, 26 senses, in 13 directions).
Input consists of a sequence of cube descriptions separated by an empty line. Each description starts with a natural . descriptions of each plane of the cube follow, separated by an empty line, each plane has rows with integer numbers each one.
for each cube, print how many lines of size contains, for any between 2 and . Follow the format of the examples. Separate the different outputs with an empty line.
Input
2 1 1 1 1 4 4 4 4 2 1 2 3 1 1 6 7 8 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
Output
Ratlles de mida 2: 12 Ratlles de mida 2: 3 Ratlles de mida 2: 158 Ratlles de mida 3: 49