April Fools Day Contest 2022 |
---|

Finished |

The following languages are additionally available for the problems from the contest

April Fools Day Contest 2022:

- Text

Virtual contest is a way to take part in past contest, as close as possible to participation on time. It is supported only ICPC mode for virtual contests.
If you've seen these problems, a virtual contest is not for you - solve these problems in the archive.
If you just want to solve some problem from a contest, a virtual contest is not for you - solve this problem in the archive.
Never use someone else's code, read the tutorials or communicate with other person during a virtual contest.

*special problem

implementation

No tag edit access

The problem statement has recently been changed. View the changes.

×
E. Are You Safe?

time limit per test

1 secondmemory limit per test

256 megabytesinput

standard inputoutput

standard outputSeven 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$$$.

Example

Input

10 atzxcodera mzhappyayc mineodteri trxesonaac mtollexcxc hjikeoutlc eascripsni rgvymnjcxm onzazwswwg geothermal

Output

YES

Codeforces (c) Copyright 2010-2024 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Jul/24/2024 02:50:38 (l3).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|