ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules

1381. Cockroaches in the Building

Time limit: 1.5 second
Memory limit: 64 MB
Petya lives in a many-storied building where each flat occupies an entire story. Petya has studied local flora and fauna for many years. Having performed montly metering, he notices the following peculiarities:
  • The number of cockroaches in each of the flats is an integer ranged from 0 to N, where N is a non-negative number not exceeding 30.
  • The number of cockroaches in a flat during a month is a function of three arguments: the number of cockroaches in this flat and the flats above and below this one during the previous month.
Petya becomes interested in inducing the ways the insects' population size changes under these laws. To avoid the special cases of ground floor and top floor, where the laws might be more complicated, Petya decided to solve this problem for an infinite-storied skyscraper. Let's consider that the number of cockroaches can decrease if they can be distributed among the flats (having no more than N in any) in such a way that in the next month the total number of cockroaches in the building will decrease. Only a finite number of cockroaches can exist in the building; thus, all the flats, except a finite number of them, are free from these insects. Likewise, the number of cockroaches can increase if they can be distributed among the flats in such a way that in the next month the total number of cockroaches in the building will increase (and may possibly become infinite).

Input

The first line of the input contains the single number N — the maximum number of cockroaches in a flat. Following are samples of the function that defines the changes in the number of cockroaches in a flat. The samples are organized in a table having N+1 block, where each block has N+1 lines, and each line has N+1 numbers ranged from 0 to N. k'th number of i'th line of j'th block contains the number of cockroaches in the flat for the current month if in the previous month there were j cockroaches in it, i cockroaches in the flat below, and k cockroaches in the flat above. The indices of blocks, lines, and numbers are zero-based. Petya has studied that if there were no cockroaches in some flat and in the flats below and above it in the previous month then there are no cockroaches in it in the current month.

Output

The output must contain either:
  • =, if the number of cockroaches can neither increase or decrease, or
  • <, if the number of cockroaches can decrease, but not increase, or
  • >, if the number of cockroaches can increase, but not decrease, or
  • <>, if the number of cockroaches can both increase and decrease.

Samples

inputoutput
1
0 1
0 1

0 0
1 1
=
2
0 0 0
0 0 0
0 0 0

1 1 1
1 1 1
1 1 1

2 2 2
2 2 2
2 2 0
<
Problem Author: Andrew Rumyantsev
Problem Source: Petrozavodsk summer training camp, August 2005.