Олимпиадный тренинг

Задача . E. Are You Safe?


Seven boys and seven girls from Athens were brought before King Minos. The evil king laughed and said "I hope you enjoy your stay in Crete".

With a loud clang, the doors behind them shut, and darkness reigned. The terrified children huddled together. In the distance they heard a bellowing, unholy roar.

Bravely, they advanced forward, to their doom.

Input

\(n\) (\(1 \le n \le 100\)) — the dimensions of the labyrinth.

Each of the next \(n\) lines contains a string of lowercase English letters of length \(n\).


Примеры
Входные данныеВыходные данные
1 10
atzxcodera
mzhappyayc
mineodteri
trxesonaac
mtollexcxc
hjikeoutlc
eascripsni
rgvymnjcxm
onzazwswwg
geothermal
YES

time 1000 ms
memory 256 Mb
Правила оформления программ и список ошибок при автоматической проверке задач

Статистика успешных решений по компиляторам
 Кол-во
С++ Mingw-w645
Комментарий учителя