Many in line

Write a program that reads cubes n×n×nn \times n \times n of integer numbers and computes how many lines of size mm contains, for any mm between 2 and nn. 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

Input consists of a sequence of cube descriptions separated by an empty line. Each description starts with a natural n2n \ge 2. nn descriptions of each plane of the cube follow, separated by an empty line, each plane has nn rows with nn integer numbers each one.

Output

for each cube, print how many lines of size mm contains, for any mm between 2 and nn. Follow the format of the examples. Separate the different outputs with an empty line.

Problem information

Author: Unknown
Translator: Carlos Molina

Generation: 2026-01-25T10:59:49.868Z

© Jutge.org, 2006–2026.
https://jutge.org