시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 (추가 시간 없음) 2048 MB114790682680.350%

문제

Eddy is overseeing construction of some new slot machines. His slot machines consist of three wheels, each of which can show one of several different digits. When activated, each wheel shows a random digit. The goal is for all wheels to be able to show the digit $7$.

A slot machine is good if each wheel is capable of showing the digit $7$, and bad otherwise. For a given slot machine, determine if it is good or bad.

입력

The first line contains a single integer $n$ $(1 \leq n \leq 10)$, which is the number of different digits on each wheel. Each wheel has the same number of digits.

Each of the next three lines contains $n$ distinct digits (in the range from $0$ to $9$). These are the digits on each of the three wheels.

출력

Output a single integer, which is $777$ if the slot machine is good, $0$ otherwise.

예제 입력 1

2
0 7
7 3
7 0

예제 출력 1

777

예제 입력 2

2
0 7
7 3
3 9

예제 출력 2

0