QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#185673#3102. Navigation 2znstz#AC ✓4ms4024kbC++204.3kb2023-09-22 14:44:052024-07-04 02:07:07

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3848kb

input:

288
7 5 10 12 1 9 9 2 1 11 
7 7 12 10 8 1 5 1 3 11 
7 12 4 7 2 8 3 8 8 2 
7 10 1 5 10 9 12 1 9 5 
7 7 7 2 12 7 5 8 1 9 
7 8 7 9 11 1 9 11 1 12 
7 12 9 10 4 1 6 2 2 7 
7 2 9 3 3 11 2 12 1 11 
7 7 5 9 11 11 1 12 11 11 
7 8 6 2 8 2 1 12 11 11 
7 12 6 10 2 2 2 4 1 3 
7 8 6 9 11 2 11 8 11 12 
7 8 12 3 2 ...

output:

1 2 1 3 1 3 4 
2 4 3 2 0 2 3 
3 0 3 0 4 0 0 
2 1 2 1 1 4 2 
2 2 0 1 1 4 0 
3 4 1 0 0 1 3 
1 2 1 3 2 1 4 
1 3 3 1 3 1 3 
3 3 4 1 1 3 3 
3 3 0 4 3 0 3 
4 2 3 3 3 2 1 
0 3 1 0 4 3 3 
3 0 0 1 3 1 2 
3 1 4 1 3 3 1 
2 3 2 0 4 3 1 
1 3 3 1 4 1 3 
3 3 1 4 3 1 3 
1 1 1 1 2 4 1 
1 3 3 3 1 3 0 
4 0 1 3 3 3 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #2:

score: 100
Accepted
time: 3ms
memory: 3712kb

input:

288
7 10 5 7 12 2 9 8 11 1 
7 10 6 12 5 1 5 1 4 9 
7 3 12 3 8 2 11 4 3 11 
7 6 12 3 8 5 1 1 1 11 
7 7 8 6 1 8 11 11 12 11 
7 4 7 12 8 2 9 1 1 3 
7 12 5 10 3 9 9 11 1 1 
7 10 1 10 10 6 12 7 9 9 
7 4 9 9 1 3 3 12 11 11 
7 7 2 4 11 3 7 12 1 11 
7 8 2 10 4 10 12 8 1 6 
7 6 10 12 7 9 9 11 2 1 
7 10 6 10 ...

output:

3 1 0 3 4 2 3 
2 4 2 2 3 1 1 
3 3 3 3 0 0 3 
3 1 2 3 0 4 3 
3 3 0 0 4 0 3 
3 0 1 0 3 2 1 
1 2 1 1 1 3 4 
2 2 1 2 1 2 2 
3 3 3 1 1 3 1 
1 3 4 3 3 3 3 
4 2 2 0 1 2 0 
1 2 1 2 1 4 3 
2 0 2 4 2 2 1 
1 3 4 3 3 1 3 
4 1 1 0 2 2 2 
2 1 1 2 1 2 2 
3 0 3 0 0 4 3 
0 2 2 0 0 4 2 
1 4 2 3 2 3 2 
2 1 1 2 2 4 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #3:

score: 100
Accepted
time: 2ms
memory: 4012kb

input:

288
7 6 12 10 8 2 9 2 11 1 
7 6 2 10 7 10 12 7 9 9 
7 8 3 4 11 1 5 12 2 2 
7 12 6 10 8 5 1 11 11 1 
7 8 12 10 8 3 6 4 2 11 
7 10 2 10 10 10 12 1 6 9 
7 12 10 10 4 3 5 11 11 1 
7 10 10 1 12 9 9 4 6 9 
7 10 3 12 8 5 9 2 1 1 
7 1 6 3 3 1 2 12 11 9 
7 12 3 10 8 4 3 11 4 2 
7 4 1 5 3 11 1 12 11 9 
7 8 8 ...

output:

2 1 3 1 0 3 4 
2 2 1 2 1 2 1 
4 0 0 3 3 3 3 
4 2 0 2 3 3 3 
2 0 3 2 0 4 3 
2 2 1 1 2 2 2 
2 2 4 1 2 3 3 
1 1 2 2 1 2 2 
2 3 1 0 2 0 4 
3 1 3 4 3 1 3 
3 2 0 0 4 3 2 
3 1 3 3 4 1 3 
3 4 0 0 0 0 3 
3 4 3 3 0 1 3 
4 2 0 3 3 2 3 
1 2 2 4 3 1 3 
3 4 1 1 1 2 2 
1 1 2 3 1 4 2 
2 0 3 1 0 3 1 
2 2 4 1 2 2 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #4:

score: 100
Accepted
time: 3ms
memory: 3760kb

input:

288
7 4 10 12 4 8 2 8 1 2 
7 8 8 6 3 2 11 11 12 1 
7 2 9 4 2 5 11 11 1 12 
7 8 8 5 2 11 11 8 12 11 
7 7 2 4 8 3 1 11 11 12 
7 12 6 3 8 6 9 8 11 2 
7 4 12 9 8 2 3 1 4 3 
7 10 1 5 10 5 12 7 4 3 
7 8 6 9 8 1 2 12 11 9 
7 12 10 3 6 9 5 2 1 2 
7 1 1 9 8 1 1 11 11 12 
7 8 12 10 4 8 4 2 11 3 
7 12 6 9 7 5 ...

output:

3 2 3 4 0 0 0 
4 3 0 0 0 3 3 
3 1 3 3 1 3 3 
3 0 0 4 0 3 3 
3 3 3 4 3 3 0 
4 3 0 2 1 0 3 
1 3 3 4 0 2 2 
2 2 2 2 2 4 2 
3 1 0 4 1 0 3 
2 3 2 1 2 4 1 
3 3 1 3 3 3 0 
2 0 0 0 4 3 2 
4 1 2 2 1 3 3 
3 3 3 3 3 4 0 
1 2 0 3 0 2 3 
2 4 2 2 2 0 0 
0 2 4 2 2 2 2 
0 2 4 2 1 2 0 
2 0 2 0 0 2 4 
4 0 2 0 2 2 0 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #5:

score: 100
Accepted
time: 2ms
memory: 3760kb

input:

300
7 4 12 10 10 9 9 2 1 1 
7 4 12 5 9 10 9 1 9 9 
7 7 10 9 2 9 9 4 12 11 
7 5 10 3 1 7 1 12 11 9 
7 8 4 4 12 10 5 3 1 2 
7 8 10 9 11 11 1 12 11 11 
7 8 11 2 12 11 1 11 11 11 
7 10 5 9 1 4 5 11 12 11 
7 6 3 10 3 8 1 8 12 11 
7 12 5 6 8 8 10 8 7 7 
7 3 5 12 10 9 9 7 2 9 
7 10 6 10 1 6 9 11 9 12 
7 4 ...

output:

2 3 1 1 2 1 4 
4 3 2 1 1 1 1 
3 2 2 1 4 1 1 
3 1 1 2 3 3 2 
2 2 4 1 0 0 3 
3 3 0 2 1 3 3 
3 3 3 3 3 0 3 
3 3 1 1 2 0 2 
3 0 3 2 1 0 3 
3 4 0 0 2 0 2 
3 1 1 2 1 1 2 
3 1 2 2 4 1 3 
3 3 4 3 2 3 1 
3 3 3 1 3 2 3 
3 1 3 2 0 3 0 
2 3 2 2 3 1 1 
2 2 2 3 2 3 0 
0 3 3 0 1 1 0 
1 3 3 0 3 3 3 
3 2 2 2 3 1 4 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #6:

score: 100
Accepted
time: 2ms
memory: 3844kb

input:

300
7 4 12 10 10 9 3 1 9 9 
7 10 12 10 8 9 1 6 11 11 
7 10 10 10 6 6 6 10 12 9 
7 10 8 7 1 11 11 4 12 11 
7 10 10 6 5 3 1 12 11 9 
7 8 4 11 4 2 8 3 12 11 
7 7 10 1 12 10 6 10 5 9 
7 8 1 5 11 6 1 12 11 4 
7 8 3 10 6 1 9 11 11 12 
7 10 1 10 10 5 12 10 6 9 
7 12 8 10 5 6 2 8 11 7 
7 8 1 10 7 8 12 8 8 8...

output:

2 3 1 4 2 1 1 
2 2 1 3 0 3 3 
1 2 2 2 2 2 2 
3 2 0 0 2 3 3 
3 1 2 2 0 2 1 
3 4 3 3 0 3 0 
2 2 2 2 1 4 2 
3 2 0 3 4 3 2 
3 3 2 0 3 1 2 
2 2 1 2 2 2 2 
0 2 4 2 3 0 3 
2 0 0 0 0 2 0 
2 3 1 0 0 2 3 
0 0 0 4 0 3 2 
2 3 3 1 4 3 0 
1 1 2 0 2 0 3 
4 3 1 3 3 3 3 
2 1 1 2 0 3 2 
3 3 3 3 3 1 1 
3 0 0 3 3 4 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #7:

score: 100
Accepted
time: 3ms
memory: 3768kb

input:

300
7 12 10 6 6 6 7 7 8 1 
7 8 10 12 1 2 11 11 4 11 
7 10 12 10 10 2 1 2 8 7 
7 2 5 1 12 1 11 11 11 2 
7 4 8 10 2 11 5 8 12 11 
7 10 10 10 5 8 6 12 10 10 
7 12 9 9 6 10 10 8 9 1 
7 10 1 10 4 3 12 10 5 4 
7 11 4 9 5 11 4 2 12 11 
7 8 4 1 8 2 11 2 11 12 
7 12 10 3 10 4 5 11 9 2 
7 10 5 12 10 9 5 8 2 1...

output:

2 0 2 2 2 2 0 
0 2 3 3 3 3 3 
2 2 3 3 2 0 2 
3 3 3 3 0 3 1 
3 0 0 2 3 3 2 
2 2 2 2 2 4 0 
1 1 2 2 2 0 1 
4 1 2 2 2 2 2 
3 1 3 1 3 3 4 
4 3 3 0 3 3 0 
2 3 2 0 2 3 1 
2 1 2 2 1 3 0 
0 2 2 2 0 2 2 
2 0 2 2 1 3 2 
2 1 3 4 3 3 3 
4 2 2 2 1 1 1 
2 0 2 0 0 0 3 
3 3 1 0 3 4 3 
3 3 0 2 3 2 3 
2 2 0 1 2 1 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #8:

score: 100
Accepted
time: 3ms
memory: 3772kb

input:

300
7 12 8 10 8 5 10 2 5 3 
7 5 10 9 11 1 9 11 11 12 
7 2 10 5 1 3 1 11 12 11 
7 10 6 6 3 11 2 12 11 9 
7 7 7 1 11 11 12 11 9 11 
7 1 8 11 11 12 4 11 11 11 
7 8 10 3 8 2 7 11 11 12 
7 10 7 12 4 10 10 5 1 11 
7 8 4 9 1 3 9 2 12 11 
7 10 1 5 10 10 12 10 10 3 
7 10 7 4 12 1 10 7 8 11 
7 10 2 10 3 10 12...

output:

0 2 0 2 2 1 2 
3 3 1 1 2 1 3 
3 3 2 4 3 1 3 
3 1 2 4 0 1 3 
3 3 3 3 1 3 4 
0 3 3 3 3 0 3 
3 3 3 0 2 2 0 
2 0 2 4 2 3 2 
3 4 3 1 0 1 1 
2 2 2 2 2 4 2 
3 2 2 0 3 2 0 
1 2 2 2 2 2 2 
3 3 3 2 2 2 0 
2 4 2 0 1 1 3 
2 3 1 2 3 3 0 
3 3 2 2 0 0 3 
2 3 1 1 2 3 3 
2 1 1 3 3 3 2 
2 3 2 1 1 3 2 
0 3 1 3 0 3 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #9:

score: 100
Accepted
time: 2ms
memory: 3836kb

input:

300
7 8 12 4 8 11 8 7 11 2 
7 4 10 10 10 12 10 9 2 10 
7 8 10 7 1 11 2 2 12 11 
7 7 3 1 11 2 9 4 11 12 
7 12 10 6 11 2 6 3 11 5 
7 1 10 10 10 12 7 4 8 5 
7 12 9 10 3 10 9 11 9 3 
7 8 4 8 8 7 1 12 11 2 
7 9 2 9 1 11 12 11 11 1 
7 10 10 9 1 11 9 11 12 9 
7 1 9 10 10 12 9 5 6 9 
7 10 4 12 8 3 10 11 1 3...

output:

3 0 3 0 0 3 0 
2 2 4 2 1 2 2 
3 4 2 0 0 3 3 
2 3 3 4 3 1 3 
2 0 3 3 2 4 3 
2 2 0 2 2 2 2 
1 2 1 2 1 3 1 
3 0 0 3 0 0 2 
3 3 4 3 3 1 1 
1 3 2 1 2 3 1 
1 2 2 1 2 1 2 
2 3 2 0 1 2 3 
2 2 2 0 2 1 2 
2 2 1 2 2 2 2 
3 3 2 1 1 3 3 
2 2 0 2 1 2 3 
3 2 2 2 1 3 1 
3 1 3 2 2 3 1 
2 1 0 2 2 0 2 
4 3 2 3 1 0 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #10:

score: 100
Accepted
time: 2ms
memory: 3712kb

input:

300
7 4 10 10 9 12 9 9 2 9 
7 8 8 3 8 3 11 11 8 12 
7 7 9 1 2 7 9 3 12 3 
7 10 6 6 3 1 9 11 11 12 
7 7 9 4 9 12 9 11 11 11 
7 12 3 6 1 10 5 11 1 2 
7 10 10 10 10 8 6 12 6 10 
7 10 10 10 10 5 4 8 10 12 
7 3 5 3 11 9 2 12 11 1 
7 2 10 5 11 1 5 8 3 12 
7 8 4 9 8 10 12 1 2 11 
7 2 2 10 8 3 2 12 11 11 
7...

output:

1 1 4 1 1 2 2 
3 0 3 0 0 3 0 
2 2 1 3 4 2 1 
3 3 0 2 4 1 1 
1 1 3 3 3 1 3 
3 0 3 2 2 3 1 
2 2 2 2 2 2 0 
0 2 2 2 2 4 2 
3 4 3 1 3 3 1 
0 2 4 3 2 2 3 
0 2 3 1 4 1 0 
3 3 3 3 2 0 1 
0 2 0 2 2 2 2 
1 2 0 2 2 2 0 
2 1 2 3 2 3 3 
3 3 2 4 1 2 2 
3 1 1 2 2 2 2 
3 4 1 1 1 3 0 
0 3 3 0 3 4 2 
2 0 2 4 2 3 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #11:

score: 100
Accepted
time: 3ms
memory: 3716kb

input:

300
7 5 2 6 8 7 7 12 11 3 
7 8 4 12 10 10 3 8 2 5 
7 10 3 5 11 11 1 12 11 11 
7 10 10 1 12 5 3 8 9 9 
7 10 2 7 8 10 12 8 8 3 
7 12 10 10 10 4 9 8 9 1 
7 10 5 12 10 7 10 8 4 9 
7 10 6 12 2 6 11 11 5 9 
7 1 9 11 2 12 11 11 1 11 
7 8 12 10 8 8 4 2 7 3 
7 4 7 10 1 2 9 11 4 12 
7 10 5 10 10 10 12 1 10 9 ...

output:

3 0 3 3 4 0 2 
0 3 4 2 2 2 0 
3 3 2 3 4 3 3 
2 4 0 1 1 2 2 
0 2 2 0 0 0 2 
2 2 2 0 1 0 1 
2 1 2 2 2 1 0 
2 4 3 3 2 1 3 
3 3 4 3 3 1 3 
2 0 0 0 0 2 2 
3 2 2 3 0 1 3 
2 2 1 1 2 2 2 
3 3 3 3 3 0 3 
3 3 0 2 3 3 3 
4 3 1 0 3 2 3 
0 2 2 2 2 2 4 
2 2 1 4 0 1 3 
0 0 0 3 3 3 4 
1 3 3 3 3 3 1 
3 2 1 0 2 2 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #12:

score: 100
Accepted
time: 0ms
memory: 3732kb

input:

300
7 10 8 12 7 8 4 8 1 11 
7 3 8 7 4 3 11 11 12 2 
7 6 10 10 2 12 9 8 11 9 
7 2 8 11 8 12 11 11 11 11 
7 7 9 3 9 3 9 1 1 12 
7 12 8 5 6 3 10 11 7 2 
7 10 8 1 5 11 8 11 12 2 
7 3 11 4 2 11 5 12 8 11 
7 5 2 10 10 10 12 2 2 5 
7 8 12 10 6 8 9 1 11 11 
7 6 1 5 6 10 12 6 10 9 
7 8 1 1 8 1 5 8 8 12 
7 8 ...

output:

2 0 0 2 0 3 0 
0 3 0 0 3 3 3 
1 3 3 1 0 2 2 
3 0 3 3 3 0 3 
1 1 3 4 1 1 1 
0 4 2 1 2 3 2 
0 3 0 3 2 3 0 
0 3 3 3 3 3 3 
2 2 2 4 0 2 1 
2 0 0 1 2 3 3 
2 2 1 2 2 4 1 
0 0 3 0 3 2 0 
2 0 3 0 3 4 3 
2 2 1 0 1 3 2 
2 2 2 0 0 4 2 
3 2 1 4 1 1 2 
3 3 3 3 4 1 3 
2 3 0 0 2 1 1 
3 2 0 4 2 2 2 
4 2 1 2 1 0 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #13:

score: 100
Accepted
time: 0ms
memory: 3848kb

input:

300
7 4 10 12 8 1 6 11 2 9 
7 12 10 10 10 8 2 7 2 3 
7 10 10 5 12 1 2 11 4 9 
7 2 10 10 3 1 11 2 11 12 
7 10 2 10 10 10 12 6 1 9 
7 8 2 10 8 2 5 12 11 9 
7 4 1 10 1 5 11 11 12 9 
7 12 6 10 6 4 3 8 3 5 
7 2 10 7 6 3 4 2 12 5 
7 5 12 10 8 8 10 7 8 3 
7 5 6 10 4 10 12 2 6 6 
7 1 6 3 11 12 11 9 11 11 
7...

output:

3 2 2 0 3 1 3 
2 2 2 0 3 2 4 
3 3 3 2 1 2 2 
4 3 2 3 2 3 1 
2 2 1 2 1 2 2 
3 1 0 3 2 0 3 
1 3 3 2 3 2 3 
4 2 2 1 3 0 0 
2 1 2 0 3 3 4 
2 3 0 2 0 0 0 
1 2 2 1 2 2 3 
3 3 3 3 1 4 3 
2 0 2 0 4 2 2 
1 0 1 1 4 2 2 
0 2 2 0 2 2 4 
3 0 3 1 2 0 3 
4 3 0 0 3 0 3 
3 0 3 0 3 4 3 
4 3 2 2 3 2 2 
2 2 4 0 3 0 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #14:

score: 100
Accepted
time: 0ms
memory: 4004kb

input:

300
7 8 3 10 1 3 6 2 12 4 
7 10 4 5 3 11 5 12 11 2 
7 10 4 10 5 11 11 2 12 9 
7 8 5 2 11 5 1 11 9 12 
7 9 6 11 11 9 12 11 9 1 
7 12 10 9 3 5 9 11 11 1 
7 1 3 11 11 12 11 11 1 11 
7 11 11 2 12 11 11 1 11 11 
7 6 9 9 11 1 11 4 3 12 
7 8 10 5 12 2 6 7 9 9 
7 10 10 12 3 4 9 11 3 11 
7 6 10 12 10 10 9 5 ...

output:

2 4 3 2 0 1 2 
3 0 2 3 4 3 3 
1 1 3 2 2 3 3 
3 1 3 0 1 3 3 
3 1 4 3 1 3 1 
2 1 1 2 1 3 3 
3 3 4 3 3 3 3 
3 3 1 3 3 3 3 
2 2 1 1 1 3 3 
3 2 2 1 1 0 2 
2 2 1 1 0 3 3 
1 2 1 2 2 3 2 
2 3 2 2 1 1 2 
2 4 0 0 2 2 2 
3 0 2 0 4 1 3 
2 2 0 0 3 1 0 
3 3 0 3 0 0 4 
2 1 2 2 2 2 1 
3 3 3 0 1 1 4 
2 2 2 0 1 4 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #15:

score: 100
Accepted
time: 3ms
memory: 3728kb

input:

300
7 9 12 10 6 9 10 1 9 11 
7 12 4 6 10 2 10 1 5 5 
7 10 12 10 8 10 5 2 8 11 
7 8 10 9 11 11 1 12 11 11 
7 2 9 5 11 12 9 11 11 11 
7 10 10 12 10 10 9 6 4 11 
7 10 12 10 10 1 9 3 4 5 
7 12 3 6 10 3 9 8 3 1 
7 5 10 2 12 10 10 8 1 5 
7 12 10 10 8 5 10 8 2 4 
7 7 7 10 1 3 5 11 12 11 
7 3 9 10 2 1 9 11 ...

output:

2 1 1 2 2 1 3 
3 0 2 3 2 1 2 
2 2 2 2 0 0 3 
3 3 0 2 1 3 3 
1 3 3 3 3 1 4 
2 2 1 2 2 3 2 
2 2 3 1 2 2 2 
3 0 2 1 1 0 2 
2 2 0 1 2 1 2 
2 2 0 2 2 0 4 
3 3 0 2 4 1 2 
3 3 2 3 1 1 3 
2 3 2 1 4 3 0 
2 2 2 2 0 4 0 
0 1 0 3 0 2 4 
4 3 3 1 3 3 1 
2 2 2 2 0 2 2 
1 1 2 1 1 3 2 
3 1 2 1 3 3 1 
0 3 3 3 3 4 0 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #16:

score: 100
Accepted
time: 0ms
memory: 3712kb

input:

300
7 10 9 3 11 1 9 4 11 12 
7 4 3 8 11 11 12 11 11 11 
7 3 9 9 11 6 9 1 11 12 
7 6 10 12 2 10 9 5 2 6 
7 10 10 2 12 6 6 1 3 9 
7 3 10 10 4 12 6 2 3 5 
7 10 12 10 5 1 5 1 9 11 
7 2 10 1 1 3 1 12 11 4 
7 4 4 9 11 5 2 12 11 1 
7 11 2 1 12 8 11 2 2 11 
7 10 6 2 1 11 5 8 12 11 
7 10 7 1 12 9 9 3 6 9 
7 ...

output:

2 3 3 2 1 1 3 
3 3 3 3 3 0 3 
1 3 1 3 1 1 3 
1 2 1 3 2 2 2 
2 2 1 2 1 2 2 
2 4 2 2 1 2 2 
2 2 3 2 2 1 3 
3 2 3 2 3 3 1 
3 4 3 3 1 3 2 
0 3 4 0 3 3 3 
3 0 4 3 2 3 2 
1 1 2 2 1 2 0 
0 3 3 0 0 3 3 
2 2 0 0 3 2 0 
2 1 2 3 1 4 2 
1 2 2 3 4 3 0 
2 2 1 0 3 3 4 
0 2 4 0 2 1 0 
2 1 4 0 2 2 1 
2 2 0 0 1 2 0 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #17:

score: 100
Accepted
time: 3ms
memory: 3968kb

input:

300
7 3 11 9 1 12 11 11 1 11 
7 10 4 5 12 10 2 11 3 9 
7 2 9 11 11 12 11 11 1 11 
7 12 3 10 10 3 1 7 4 3 
7 9 5 5 2 9 1 11 12 11 
7 8 10 3 8 1 9 1 11 12 
7 10 12 9 8 2 10 2 4 11 
7 11 1 3 3 11 12 11 1 11 
7 4 6 10 8 12 8 10 10 6 
7 8 9 10 1 5 11 11 12 1 
7 10 8 6 11 2 1 12 1 11 
7 9 12 10 9 9 1 4 11...

output:

3 3 1 3 3 3 1 
2 3 3 0 1 2 3 
3 3 1 3 3 1 3 
3 2 2 1 3 2 2 
3 3 1 4 1 1 3 
1 3 3 0 2 1 0 
1 2 3 2 0 2 3 
1 3 3 3 4 3 3 
0 0 2 2 2 4 2 
0 3 1 2 0 2 3 
4 3 2 0 0 3 3 
2 1 1 3 1 3 1 
3 3 3 3 1 3 0 
2 3 3 0 0 2 2 
4 3 2 3 0 0 0 
3 1 3 3 3 3 4 
3 0 3 3 0 3 3 
3 2 3 0 2 3 2 
2 2 1 1 0 2 2 
3 1 3 1 3 4 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #18:

score: 100
Accepted
time: 3ms
memory: 3760kb

input:

300
7 10 5 10 10 5 12 8 9 9 
7 1 2 10 1 3 9 4 3 12 
7 10 10 2 12 7 10 8 8 10 
7 10 2 7 6 3 3 5 12 8 
7 8 5 1 8 11 2 12 11 1 
7 8 12 10 8 10 10 3 2 11 
7 7 10 3 1 5 2 12 11 11 
7 10 3 4 2 5 9 8 11 12 
7 10 1 9 6 4 5 3 11 12 
7 10 4 5 12 10 10 11 9 1 
7 8 6 6 1 11 1 11 12 3 
7 1 8 10 7 12 10 8 8 10 
7...

output:

2 2 1 0 1 2 2 
2 2 2 3 3 1 3 
2 2 0 0 2 2 2 
0 2 3 0 2 3 3 
3 4 0 1 3 0 3 
2 0 2 2 0 4 3 
3 3 4 2 3 3 2 
0 3 3 2 3 1 3 
4 3 1 2 3 2 2 
2 2 3 1 4 2 3 
2 3 4 0 0 3 3 
2 2 0 2 0 0 2 
2 2 2 4 2 2 2 
2 2 2 2 2 1 3 
4 2 2 3 2 3 2 
3 1 3 2 3 0 3 
2 2 0 3 1 0 4 
2 0 0 2 2 0 2 
0 0 3 3 0 0 3 
4 3 0 2 2 2 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #19:

score: 100
Accepted
time: 4ms
memory: 4016kb

input:

300
7 7 5 12 6 6 10 5 1 5 
7 7 12 4 8 8 8 3 6 3 
7 3 11 3 11 12 11 8 1 11 
7 2 7 12 8 1 9 3 4 9 
7 8 1 8 11 11 12 2 11 11 
7 10 6 12 10 5 4 7 1 11 
7 10 10 5 12 9 10 1 3 9 
7 12 10 10 3 6 9 1 11 1 
7 7 10 9 6 9 9 1 12 11 
7 11 3 9 8 11 12 11 11 11 
7 12 9 10 4 7 1 5 2 1 
7 10 3 10 10 5 12 10 10 10 
...

output:

4 1 2 2 2 2 2 
3 4 0 0 0 2 2 
3 3 1 3 0 3 3 
3 0 1 0 3 1 4 
3 3 3 4 3 0 0 
2 4 0 2 2 3 2 
1 2 1 0 1 2 2 
2 2 1 2 1 1 3 
3 1 2 1 4 1 1 
0 3 3 3 3 1 3 
1 2 4 2 3 2 0 
2 2 2 2 2 2 2 
3 3 3 1 2 1 1 
2 2 3 0 2 3 3 
2 3 0 4 0 0 0 
3 2 3 3 2 0 3 
2 0 2 1 2 2 2 
0 3 2 1 3 3 3 
1 1 2 3 2 0 1 
2 0 4 0 2 2 1 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #20:

score: 100
Accepted
time: 0ms
memory: 3776kb

input:

300
7 10 10 12 4 9 5 7 2 11 
7 1 10 12 11 3 9 11 4 2 
7 12 7 10 10 5 9 4 9 1 
7 10 10 2 12 8 10 8 6 3 
7 12 10 10 4 10 10 4 8 2 
7 8 12 6 3 8 10 5 1 5 
7 10 1 10 10 7 12 4 9 5 
7 10 9 12 9 10 5 11 1 11 
7 12 8 10 4 4 7 1 4 1 
7 3 11 9 1 12 3 8 11 11 
7 10 2 9 8 1 2 12 11 3 
7 2 10 3 4 1 1 11 2 12 
7...

output:

2 2 2 4 1 3 2 
3 2 1 3 3 0 3 
0 2 2 2 1 2 1 
0 2 0 2 2 2 2 
2 2 4 2 2 2 0 
0 0 0 2 3 1 2 
2 2 2 2 1 2 2 
2 1 2 1 2 3 3 
0 2 4 0 2 1 2 
4 3 3 3 0 3 1 
3 2 2 3 1 0 3 
3 0 3 3 2 3 4 
1 2 1 2 4 2 1 
0 1 1 2 3 2 2 
3 3 1 0 0 2 2 
3 3 3 1 0 3 1 
2 2 1 1 2 1 2 
3 0 3 1 0 2 2 
2 2 1 1 4 1 1 
4 0 2 3 0 3 0 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #21:

score: 100
Accepted
time: 3ms
memory: 3772kb

input:

300
7 10 5 4 12 4 9 10 10 10 
7 10 10 12 10 4 9 11 2 11 
7 10 4 10 1 5 4 1 4 12 
7 1 11 11 11 12 1 11 11 11 
7 8 3 10 2 8 11 11 12 1 
7 5 2 8 8 12 8 11 2 11 
7 4 2 6 8 11 3 12 11 1 
7 8 12 10 10 8 10 2 11 8 
7 11 1 11 11 2 12 11 2 9 
7 2 7 8 11 12 11 2 11 11 
7 2 8 10 10 12 10 10 8 2 
7 8 5 10 10 4 ...

output:

0 1 2 2 2 2 1 
2 2 1 2 0 3 3 
1 2 2 2 3 4 3 
3 3 3 3 3 3 3 
4 3 3 2 0 0 3 
0 0 4 3 3 3 0 
3 4 3 3 0 0 3 
2 0 0 2 2 3 0 
3 3 1 3 0 3 3 
3 3 3 3 4 0 0 
2 2 0 0 2 0 2 
2 1 0 2 3 2 0 
2 4 1 3 3 0 3 
1 0 2 2 4 2 2 
2 0 2 2 2 2 1 
1 2 2 3 1 0 0 
0 3 3 1 3 3 3 
3 3 1 3 3 0 0 
1 3 2 3 2 3 2 
3 2 3 0 1 3 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #22:

score: 100
Accepted
time: 3ms
memory: 3660kb

input:

300
7 11 1 11 4 4 12 11 9 11 
7 9 10 12 9 1 4 11 5 5 
7 2 6 9 1 12 11 9 11 11 
7 3 9 9 11 12 1 11 2 11 
7 10 12 9 10 10 5 1 11 9 
7 1 11 9 11 12 11 11 11 11 
7 10 10 6 12 2 9 8 3 11 
7 12 9 9 4 10 10 6 9 3 
7 7 1 7 11 5 2 12 11 3 
7 10 5 3 11 8 5 12 4 3 
7 10 6 9 8 5 12 3 6 4 
7 8 4 12 8 10 6 2 2 8 ...

output:

4 0 3 3 1 3 3 
1 2 4 1 3 2 3 
3 3 3 3 1 4 1 
3 3 4 3 3 1 1 
1 2 2 2 2 3 1 
3 3 3 3 3 3 1 
3 1 0 0 3 2 2 
1 1 4 2 2 2 1 
3 2 4 3 0 3 2 
2 0 2 1 3 3 0 
0 0 2 4 2 1 2 
0 3 2 0 2 0 4 
1 1 3 1 4 2 2 
3 2 3 0 4 0 0 
2 2 4 1 3 1 3 
3 3 3 3 3 3 3 
1 3 2 2 1 1 2 
3 0 1 2 2 0 3 
2 3 3 3 2 3 2 
3 1 4 1 1 3 1 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #23:

score: 100
Accepted
time: 3ms
memory: 3832kb

input:

300
7 3 1 9 2 12 3 11 11 11 
7 2 3 9 1 12 11 11 11 1 
7 1 10 5 3 9 11 11 12 9 
7 8 11 1 4 8 11 3 12 11 
7 10 10 12 3 3 10 6 4 11 
7 3 11 2 11 12 2 8 11 11 
7 11 1 8 11 11 12 11 1 11 
7 10 10 1 1 11 9 11 12 11 
7 12 6 10 8 4 9 4 4 1 
7 12 8 3 10 10 10 11 7 2 
7 6 10 1 12 10 10 2 8 7 
7 10 2 10 10 10 ...

output:

4 3 3 3 3 3 1 
3 3 3 4 3 3 1 
1 3 2 4 3 1 3 
3 4 3 3 0 0 3 
2 2 2 3 3 3 2 
3 3 3 3 0 3 3 
3 3 3 3 4 0 3 
3 3 2 3 2 3 1 
4 2 0 0 1 2 2 
0 3 2 2 2 3 2 
2 2 4 0 2 1 2 
2 2 1 1 1 2 2 
2 2 1 1 3 3 3 
0 3 3 0 3 3 0 
1 2 1 1 1 2 2 
3 0 2 0 2 2 4 
3 2 0 0 1 2 3 
3 3 4 0 3 3 3 
2 4 1 2 3 0 3 
3 3 0 3 2 3 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #24:

score: 100
Accepted
time: 0ms
memory: 3712kb

input:

300
7 10 6 4 12 2 9 4 8 3 
7 11 3 6 12 11 11 11 1 2 
7 10 10 12 10 8 7 11 1 11 
7 10 2 9 3 11 1 12 11 3 
7 12 10 10 4 11 6 11 3 5 
7 8 10 4 1 11 1 12 8 2 
7 10 10 12 10 10 9 8 6 11 
7 10 3 4 11 3 11 2 8 12 
7 1 10 10 9 12 3 9 10 9 
7 12 10 4 10 3 9 8 6 5 
7 3 10 6 8 12 10 7 10 10 
7 10 12 9 2 10 1 5...

output:

3 1 2 0 0 2 4 
3 3 3 1 0 3 3 
2 2 2 2 0 3 3 
3 2 2 3 1 1 3 
2 2 1 3 2 3 0 
0 0 0 2 3 3 3 
2 2 1 2 2 3 0 
1 0 3 2 3 3 3 
4 1 2 1 1 2 2 
2 3 2 3 1 0 2 
2 0 2 2 2 2 0 
1 2 2 3 3 0 2 
2 2 0 3 1 1 2 
0 0 0 2 2 3 4 
3 3 1 3 4 3 1 
2 3 3 3 0 0 3 
3 3 3 3 3 3 3 
2 1 1 0 2 2 3 
2 2 0 1 3 0 2 
2 1 0 2 2 2 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #25:

score: 100
Accepted
time: 0ms
memory: 3764kb

input:

300
7 8 12 4 10 3 10 1 3 11 
7 6 10 9 11 7 2 12 11 1 
7 3 10 10 8 12 10 8 10 4 
7 10 1 10 3 5 12 6 6 10 
7 8 12 5 1 1 10 1 9 9 
7 3 10 10 10 12 5 7 8 10 
7 10 9 10 5 9 10 10 12 4 
7 10 3 7 1 2 11 11 12 11 
7 12 10 10 4 3 5 11 4 1 
7 4 1 9 8 8 2 12 8 3 
7 1 7 10 8 12 10 8 10 8 
7 8 1 9 1 11 7 11 12 2...

output:

3 0 1 2 2 2 3 
3 4 1 2 1 3 2 
2 0 2 2 0 2 2 
1 2 2 2 2 2 2 
4 0 3 2 3 1 1 
2 2 0 2 2 2 2 
2 2 1 2 2 1 2 
3 3 3 0 2 3 3 
2 2 4 1 2 3 2 
0 2 3 3 1 0 0 
2 0 2 0 0 0 2 
0 3 3 1 0 3 2 
3 4 1 2 2 2 1 
1 1 0 2 1 2 2 
0 2 2 3 1 2 2 
2 2 3 3 1 2 2 
4 3 0 3 3 3 0 
1 3 2 3 1 2 0 
2 3 3 2 0 0 3 
3 2 2 1 3 0 0 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #26:

score: 100
Accepted
time: 1ms
memory: 3924kb

input:

300
7 10 5 10 4 10 12 2 11 4 
7 2 6 11 11 12 11 11 1 11 
7 10 9 9 2 4 6 11 12 11 
7 10 4 6 10 2 12 5 11 9 
7 10 5 9 1 1 3 11 12 9 
7 10 10 4 12 10 10 3 7 9 
7 7 10 10 10 5 10 2 10 12 
7 10 12 8 11 8 2 5 3 4 
7 9 5 10 3 10 12 4 11 11 
7 7 7 12 5 7 10 2 3 9 
7 10 6 9 3 11 2 12 11 11 
7 8 2 3 3 5 6 11 ...

output:

1 2 2 1 3 2 2 
3 3 1 3 3 4 3 
3 3 1 1 2 0 2 
2 3 1 2 3 0 2 
1 3 1 1 2 3 4 
2 2 4 2 1 2 2 
1 2 2 4 2 2 2 
0 2 0 3 3 0 2 
3 2 3 2 3 2 1 
4 0 2 2 2 1 1 
3 3 2 4 1 1 3 
3 3 3 3 0 2 2 
2 3 2 3 2 3 4 
3 3 3 3 3 4 0 
4 0 3 2 0 3 3 
3 3 1 1 2 1 0 
3 3 0 2 3 0 3 
3 3 3 0 3 3 3 
3 0 3 0 0 3 3 
1 3 3 3 3 4 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #27:

score: 100
Accepted
time: 2ms
memory: 3836kb

input:

300
7 1 10 10 10 12 9 5 1 5 
7 12 5 10 4 2 9 11 2 1 
7 10 10 10 10 6 7 10 10 12 
7 8 10 10 11 1 11 8 11 12 
7 8 1 2 12 11 11 8 11 11 
7 8 4 5 2 6 7 8 12 8 
7 6 9 10 8 3 9 8 11 12 
7 7 10 10 1 2 7 11 12 2 
7 2 6 10 10 12 10 8 10 9 
7 1 10 9 3 12 9 10 10 3 
7 10 12 10 4 3 1 3 3 6 
7 2 2 4 11 11 12 2 1...

output:

1 2 4 2 2 2 2 
1 2 4 3 1 3 0 
2 2 2 2 2 2 2 
0 3 2 0 2 3 3 
3 3 0 3 3 0 3 
0 0 3 4 0 2 2 
0 3 2 1 1 1 0 
0 3 2 2 4 3 2 
2 2 2 1 0 4 2 
1 1 2 2 2 2 1 
2 2 1 3 4 2 2 
3 3 3 4 1 3 3 
0 3 1 3 2 2 4 
3 0 3 3 3 3 0 
1 1 2 1 2 3 1 
3 1 3 0 4 3 3 
1 4 3 3 2 1 2 
3 3 1 3 3 3 3 
1 2 0 4 2 2 3 
3 1 3 3 1 3 1 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #28:

score: 100
Accepted
time: 3ms
memory: 3708kb

input:

300
7 1 3 3 2 7 9 11 12 1 
7 10 7 10 8 10 5 10 12 8 
7 6 9 12 4 10 9 5 1 1 
7 10 12 10 7 1 8 1 11 2 
7 6 9 6 11 9 1 12 11 11 
7 10 7 4 12 8 2 2 5 4 
7 11 1 11 4 11 9 11 12 11 
7 10 12 10 7 8 6 1 11 9 
7 6 10 12 3 10 4 8 5 11 
7 6 3 12 8 5 4 11 1 4 
7 10 12 3 11 2 7 5 11 11 
7 10 4 9 8 4 2 12 11 1 
7...

output:

4 3 3 3 3 2 1 
0 2 4 2 2 2 0 
1 1 1 4 2 0 2 
2 2 3 0 2 3 0 
3 3 1 1 0 3 1 
0 3 1 2 2 2 0 
3 3 3 3 3 3 1 
2 2 0 2 2 3 1 
1 2 4 3 2 3 0 
1 3 0 0 2 2 3 
3 2 3 2 3 3 3 
3 4 2 3 1 0 0 
3 3 2 0 0 2 0 
1 2 2 4 1 2 2 
3 3 4 0 1 2 3 
3 2 1 2 0 2 2 
3 2 2 2 0 2 3 
2 2 2 0 1 3 3 
3 3 3 4 0 0 3 
3 1 3 3 3 3 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #29:

score: 100
Accepted
time: 3ms
memory: 3928kb

input:

300
7 10 3 12 4 6 2 8 3 9 
7 10 4 9 10 10 12 4 9 10 
7 12 4 4 10 3 4 11 4 1 
7 10 9 10 6 10 5 12 6 10 
7 12 10 5 8 8 11 2 11 5 
7 10 10 4 12 10 2 4 7 2 
7 3 5 9 3 4 9 1 12 11 
7 8 10 7 1 11 9 4 12 11 
7 1 2 10 1 1 9 11 11 12 
7 10 10 1 12 3 9 7 2 10 
7 11 1 9 11 1 12 11 11 9 
7 9 3 10 2 1 9 4 11 12 ...

output:

2 3 3 4 2 1 0 
2 2 2 2 1 1 2 
3 3 2 1 0 3 2 
2 2 2 1 2 2 2 
2 4 0 0 3 1 3 
2 3 2 2 0 2 2 
3 1 1 1 3 0 1 
3 2 2 0 0 3 1 
3 3 2 3 3 1 3 
1 1 2 0 2 2 2 
3 3 1 3 3 1 3 
2 3 2 1 3 1 3 
3 1 1 2 2 3 3 
2 2 1 1 2 2 2 
2 2 0 2 0 3 0 
3 3 3 3 3 4 1 
4 2 0 0 2 3 3 
3 3 0 3 3 3 3 
0 3 3 3 1 1 1 
3 1 1 2 3 3 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #30:

score: 100
Accepted
time: 4ms
memory: 3768kb

input:

300
7 1 10 10 10 12 6 10 8 2 
7 8 10 12 8 8 10 2 2 3 
7 7 10 7 5 10 10 10 12 4 
7 10 8 8 4 2 11 8 11 12 
7 9 9 9 1 9 11 4 12 11 
7 10 7 1 12 10 10 10 5 9 
7 4 9 10 1 11 9 11 12 11 
7 10 12 3 10 4 9 2 8 7 
7 8 10 3 2 11 3 8 12 11 
7 12 10 3 7 5 3 1 11 1 
7 8 9 9 1 1 9 2 11 12 
7 6 1 4 9 12 9 11 11 11...

output:

2 2 0 0 2 2 2 
0 2 2 0 0 2 4 
2 2 2 0 4 2 2 
0 3 0 2 0 3 4 
3 2 1 1 1 1 3 
2 2 2 2 1 2 0 
3 3 1 2 3 3 1 
3 2 0 1 2 0 2 
3 0 2 3 0 3 4 
2 3 2 2 4 1 3 
4 3 1 0 1 1 3 
1 1 3 3 3 3 3 
3 1 3 3 0 0 3 
3 1 1 2 3 2 3 
1 3 3 0 3 0 3 
3 3 2 0 3 3 0 
3 2 2 1 1 0 3 
3 2 2 1 3 0 0 
1 3 0 2 0 2 3 
2 4 2 1 1 1 0 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #31:

score: 100
Accepted
time: 4ms
memory: 3776kb

input:

300
7 1 9 1 4 5 9 2 11 12 
7 8 11 11 4 11 8 11 12 2 
7 10 12 10 2 9 4 5 9 9 
7 7 10 1 12 10 9 8 9 3 
7 2 9 3 11 12 11 11 11 11 
7 10 8 1 2 8 6 11 12 11 
7 1 10 9 6 9 2 3 12 11 
7 12 8 10 1 7 9 11 6 1 
7 10 10 10 8 8 6 12 6 10 
7 8 10 7 2 8 1 8 12 11 
7 2 11 8 8 12 11 11 2 11 
7 6 9 1 8 1 11 11 9 12 ...

output:

1 3 3 3 1 1 1 
0 3 3 3 0 3 0 
2 2 1 4 3 1 1 
2 1 0 1 2 4 2 
3 3 3 3 3 1 3 
3 3 0 3 2 0 2 
3 4 2 1 3 1 3 
0 2 3 2 1 3 2 
2 2 2 2 2 0 0 
3 0 2 0 0 0 3 
3 0 0 3 3 3 0 
3 1 3 1 1 3 0 
3 0 0 4 3 3 2 
3 3 3 3 1 0 3 
3 2 3 3 3 3 3 
2 1 1 3 3 3 1 
2 3 3 0 2 2 2 
2 4 1 0 2 1 1 
0 3 0 3 0 0 2 
1 2 2 1 2 1 1 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #32:

score: 100
Accepted
time: 0ms
memory: 4012kb

input:

300
7 6 10 5 8 2 11 11 11 12 
7 11 4 9 6 5 11 1 12 11 
7 8 10 5 2 8 1 12 11 1 
7 5 10 6 12 10 9 8 8 9 
7 3 11 6 11 12 3 11 8 11 
7 10 12 9 7 10 9 2 11 11 
7 2 2 9 11 11 12 2 11 9 
7 10 12 10 1 4 9 2 11 11 
7 8 5 12 5 9 5 5 1 11 
7 4 3 5 3 12 3 11 11 11 
7 12 10 10 8 7 9 6 8 4 
7 2 3 11 11 12 11 11 1...

output:

3 3 4 1 2 3 0 
3 1 3 1 3 0 3 
3 0 0 2 4 3 0 
2 1 0 0 1 3 2 
4 3 0 3 3 3 0 
1 2 2 1 2 3 3 
3 3 1 4 3 1 3 
2 2 0 1 3 3 3 
0 1 2 2 1 3 2 
3 3 3 3 3 3 4 
2 2 0 2 1 2 0 
3 3 3 3 3 3 3 
2 2 2 2 2 2 2 
3 2 3 2 1 2 4 
2 2 0 0 2 2 2 
3 4 1 1 1 1 0 
0 2 0 4 0 2 2 
3 3 0 2 2 1 3 
2 0 2 0 2 4 0 
0 0 3 3 3 2 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #33:

score: 100
Accepted
time: 1ms
memory: 3772kb

input:

300
7 10 10 10 10 5 10 2 9 12 
7 10 12 10 1 9 9 1 3 11 
7 8 6 12 7 10 10 3 3 11 
7 8 10 1 5 1 9 4 9 12 
7 6 2 9 8 5 12 5 10 1 
7 12 6 10 2 8 9 8 11 2 
7 10 12 3 5 9 10 1 3 11 
7 3 1 9 11 9 12 1 11 11 
7 4 9 9 11 12 11 11 9 11 
7 10 4 12 10 1 10 1 2 9 
7 1 10 10 8 12 10 8 1 2 
7 8 10 10 7 5 9 11 9 12...

output:

1 1 2 2 2 2 2 
2 2 1 1 3 2 3 
0 4 2 2 2 3 2 
2 1 3 0 2 1 2 
0 2 4 2 2 1 1 
4 2 3 0 1 0 3 
3 2 1 2 2 2 3 
3 1 3 1 3 1 3 
3 3 1 3 3 1 1 
2 3 2 2 3 1 1 
2 0 4 0 0 2 2 
3 1 2 0 2 1 2 
3 1 3 2 3 3 2 
3 0 2 0 2 3 4 
1 2 2 2 1 2 2 
0 1 1 2 0 0 3 
2 0 2 0 3 0 2 
3 2 2 3 2 3 2 
1 1 2 2 3 3 2 
0 2 1 2 1 2 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #34:

score: 100
Accepted
time: 2ms
memory: 3708kb

input:

300
7 2 9 12 7 3 1 11 4 9 
7 1 10 10 4 12 10 3 9 5 
7 6 4 12 10 2 10 4 3 9 
7 12 10 5 10 5 1 8 7 3 
7 10 1 10 4 9 9 2 12 11 
7 12 6 10 8 1 10 8 8 3 
7 8 8 11 5 11 3 8 12 11 
7 10 12 10 8 10 2 1 11 2 
7 10 3 12 4 6 10 11 1 1 
7 7 9 10 6 12 4 8 11 9 
7 4 5 9 2 2 12 3 11 9 
7 8 10 2 11 2 5 12 1 11 
7 1...

output:

3 1 3 2 3 1 3 
2 4 1 2 2 2 2 
1 3 2 2 3 1 2 
2 4 2 2 3 0 2 
3 1 3 2 2 1 1 
4 2 0 3 2 0 0 
3 0 0 3 0 3 3 
2 2 2 3 0 3 0 
2 3 2 4 2 0 3 
4 2 3 1 0 1 2 
3 3 1 4 3 1 3 
1 3 0 2 3 3 3 
1 1 3 4 3 3 3 
0 2 2 3 2 3 4 
1 3 0 4 0 3 3 
2 1 2 2 2 2 2 
3 1 3 2 0 3 1 
3 3 2 3 4 0 0 
2 2 0 3 3 2 0 
3 3 3 4 1 3 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #35:

score: 100
Accepted
time: 3ms
memory: 3708kb

input:

300
7 10 10 2 12 4 4 8 6 8 
7 5 10 6 1 3 9 11 12 11 
7 12 4 7 8 10 9 7 11 2 
7 10 12 3 5 6 2 3 1 2 
7 8 1 9 1 1 11 11 11 12 
7 12 8 3 10 2 6 1 5 1 
7 12 3 10 8 8 11 2 4 4 
7 10 1 10 4 8 12 8 8 10 
7 10 9 12 10 1 9 8 2 9 
7 6 10 2 12 10 10 9 10 3 
7 12 9 10 2 4 10 11 2 6 
7 10 8 8 8 3 7 12 11 4 
7 8 ...

output:

0 0 0 2 0 2 2 
3 3 2 0 1 1 1 
3 0 0 2 1 2 3 
3 2 2 3 2 1 0 
3 3 1 0 3 3 3 
0 3 2 3 2 1 2 
3 2 0 0 3 1 2 
4 0 2 0 0 2 2 
2 1 1 2 3 1 0 
2 2 1 2 2 1 2 
1 2 3 1 2 3 4 
3 2 2 0 0 0 3 
3 2 2 1 0 1 3 
2 2 2 1 4 2 2 
0 3 3 3 3 3 3 
3 1 3 3 1 1 1 
0 0 1 3 2 0 3 
3 2 0 0 1 3 3 
3 0 0 0 0 2 3 
3 3 0 3 0 0 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #36:

score: 100
Accepted
time: 0ms
memory: 3764kb

input:

300
7 10 5 9 2 4 1 12 11 11 
7 8 5 12 7 9 3 8 1 5 
7 8 3 10 6 2 6 11 2 12 
7 11 9 1 12 4 11 11 11 11 
7 2 10 2 7 5 6 12 8 3 
7 12 10 6 2 10 10 8 6 1 
7 10 8 2 6 5 5 3 12 11 
7 6 6 3 11 5 1 12 11 4 
7 4 6 6 8 11 1 12 11 11 
7 1 9 9 5 11 2 12 3 11 
7 8 12 5 10 8 7 3 1 9 
7 10 1 10 8 5 12 4 6 9 
7 10 1...

output:

3 3 2 1 1 3 0 
0 1 4 2 1 2 0 
3 0 2 0 3 2 2 
0 3 3 3 3 3 1 
0 0 3 2 3 2 0 
2 0 3 2 2 0 2 
3 4 0 3 2 0 0 
3 2 1 4 3 3 2 
3 3 3 4 0 0 3 
2 3 3 1 1 2 3 
4 0 0 2 2 1 1 
0 2 1 2 2 2 2 
2 2 3 3 3 3 0 
3 3 3 3 4 3 3 
0 3 2 0 3 1 3 
3 2 0 2 2 3 3 
3 3 3 3 3 1 3 
2 3 3 2 1 4 2 
2 2 1 1 4 3 2 
2 1 0 1 2 4 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #37:

score: 100
Accepted
time: 3ms
memory: 3736kb

input:

300
7 5 10 10 10 5 9 3 10 12 
7 10 10 12 4 10 2 4 3 9 
7 7 4 10 2 8 1 12 2 11 
7 9 9 5 2 6 9 1 12 11 
7 4 1 9 11 4 2 12 8 9 
7 10 10 1 5 6 3 12 11 2 
7 3 9 9 6 3 1 12 9 3 
7 12 10 3 3 10 10 8 11 2 
7 4 5 12 10 10 9 7 1 6 
7 7 10 2 12 8 4 7 10 10 
7 10 5 12 1 6 9 6 2 11 
7 10 10 12 1 9 10 8 2 9 
7 9 ...

output:

4 2 2 1 2 1 2 
2 2 3 4 2 1 2 
0 3 4 3 2 3 0 
3 1 1 4 1 2 1 
0 1 3 3 1 3 0 
3 0 2 2 3 2 2 
1 2 3 1 1 2 1 
2 3 1 2 2 0 3 
3 1 1 2 2 2 2 
0 0 2 2 2 4 2 
2 1 1 3 2 3 2 
2 2 2 3 1 1 0 
4 3 3 3 3 3 1 
1 3 3 3 1 3 1 
2 2 2 2 1 0 2 
3 3 3 1 2 0 1 
4 0 0 2 0 2 2 
3 3 1 0 1 2 3 
2 2 0 1 2 2 1 
1 2 2 2 2 2 4 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #38:

score: 100
Accepted
time: 2ms
memory: 3712kb

input:

300
7 10 8 10 1 11 8 11 12 8 
7 10 2 2 1 6 12 1 3 11 
7 1 11 6 11 12 6 11 9 11 
7 10 9 6 12 9 11 11 2 9 
7 1 6 10 8 12 10 1 10 10 
7 10 10 4 12 10 9 10 10 9 
7 1 8 2 12 8 11 8 3 3 
7 3 7 9 7 12 11 2 11 9 
7 1 10 6 7 12 8 10 10 5 
7 11 12 5 11 11 1 2 11 11 
7 10 5 10 10 6 12 3 8 10 
7 2 9 10 1 10 11 ...

output:

0 3 0 2 2 3 0 
3 2 3 1 2 3 2 
2 3 1 3 3 3 0 
1 3 3 4 1 2 1 
2 0 2 2 1 4 2 
2 1 2 2 1 2 2 
0 3 0 2 2 3 0 
3 2 3 1 1 0 1 
0 2 2 2 2 2 0 
4 3 3 3 3 3 3 
2 2 2 4 0 2 2 
1 2 1 2 3 2 3 
2 2 2 2 0 2 2 
0 0 0 3 2 2 3 
3 0 2 4 0 2 2 
2 2 2 0 1 2 2 
0 3 0 2 2 0 2 
3 1 1 4 3 3 3 
2 3 2 2 4 1 3 
1 2 3 3 4 3 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #39:

score: 100
Accepted
time: 2ms
memory: 3776kb

input:

300
7 3 12 6 10 11 9 5 9 9 
7 6 2 4 7 12 11 3 8 11 
7 12 10 10 2 9 9 10 9 4 
7 8 4 10 8 8 1 12 8 8 
7 4 10 9 3 12 2 11 9 9 
7 7 1 10 10 8 12 8 3 8 
7 8 11 12 2 9 11 11 1 11 
7 12 10 9 6 9 3 10 6 1 
7 12 8 9 11 2 11 1 11 2 
7 8 10 10 8 4 1 12 9 11 
7 10 6 2 12 9 10 10 1 9 
7 9 2 4 12 11 1 1 11 9 
7 9...

output:

0 3 3 1 2 1 1 
3 2 0 3 4 3 3 
2 2 3 1 1 2 1 
0 0 0 3 2 0 0 
3 3 1 1 3 2 1 
2 0 0 0 2 2 4 
0 3 3 3 1 3 3 
2 1 2 1 4 2 2 
0 1 3 3 3 1 3 
1 3 0 2 2 0 0 
1 2 2 1 1 2 4 
3 3 1 3 1 1 3 
1 3 3 3 1 3 3 
3 2 2 1 3 1 4 
3 3 3 2 1 3 2 
2 2 3 2 0 2 0 
3 0 3 3 4 3 3 
0 2 0 2 2 2 2 
3 3 3 1 0 3 3 
2 1 4 1 2 3 1 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #40:

score: 100
Accepted
time: 0ms
memory: 3708kb

input:

300
7 10 11 3 12 11 2 11 9 11 
7 1 8 11 3 12 5 11 11 9 
7 12 10 10 6 10 9 11 10 1 
7 8 10 4 2 10 1 12 11 8 
7 3 3 3 8 10 3 12 5 9 
7 12 10 10 10 10 10 11 8 4 
7 11 12 5 11 11 11 1 11 11 
7 10 4 10 3 8 5 12 11 11 
7 10 10 10 4 10 10 10 12 10 
7 12 9 11 11 1 9 11 11 2 
7 3 10 10 5 11 10 8 12 9 
7 9 10...

output:

3 3 3 1 3 2 3 
2 1 3 1 3 0 3 
2 2 2 2 1 3 2 
3 0 0 2 3 3 2 
2 1 3 3 3 0 2 
2 2 2 2 2 3 0 
4 3 3 3 3 3 3 
3 3 2 3 2 3 0 
2 2 2 2 2 2 2 
1 3 3 3 1 3 3 
1 0 2 2 3 3 2 
3 1 2 1 2 2 0 
0 1 2 2 3 3 3 
2 3 3 1 1 1 2 
2 0 2 2 4 2 2 
2 1 2 2 2 2 1 
3 3 3 3 4 1 1 
1 1 3 2 1 4 1 
1 3 3 3 3 3 3 
3 1 3 3 3 3 0 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #41:

score: 100
Accepted
time: 3ms
memory: 3772kb

input:

300
7 5 8 12 10 1 9 8 2 11 
7 9 9 12 10 9 1 11 1 10 
7 10 12 9 4 10 9 3 1 10 
7 9 10 10 5 1 10 4 12 11 
7 1 10 10 7 12 10 10 2 9 
7 12 6 10 10 5 4 1 9 7 
7 12 10 6 10 10 9 11 10 1 
7 10 12 10 6 10 9 2 9 11 
7 1 11 11 3 12 11 3 11 4 
7 10 1 8 8 11 2 12 3 11 
7 11 10 10 6 9 11 11 12 3 
7 10 3 9 2 11 1...

output:

1 0 1 2 3 3 0 
1 1 3 2 1 2 3 
1 2 2 1 4 1 2 
3 2 2 2 1 3 2 
2 2 0 1 2 2 2 
1 2 2 0 4 1 1 
2 0 2 2 1 3 2 
2 2 2 1 2 1 3 
3 1 3 2 2 3 3 
2 3 2 3 0 0 3 
0 3 2 2 3 1 3 
3 3 3 3 1 1 2 
2 2 2 0 2 1 3 
3 0 3 3 3 4 1 
3 3 3 1 3 3 2 
2 2 2 0 2 2 2 
3 3 4 2 2 3 3 
2 3 3 0 3 3 4 
3 1 2 1 4 1 2 
4 3 1 3 3 3 0 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #42:

score: 100
Accepted
time: 0ms
memory: 3776kb

input:

300
7 2 9 6 1 11 9 4 12 9 
7 6 10 10 9 12 10 10 10 10 
7 2 10 10 10 12 4 7 8 10 
7 3 10 9 8 12 10 10 1 1 
7 12 6 8 8 8 9 8 10 1 
7 7 10 1 12 9 10 10 9 3 
7 1 8 9 7 12 6 11 11 4 
7 8 9 1 12 11 9 8 11 11 
7 1 8 11 11 12 11 11 3 3 
7 10 12 9 10 1 10 1 8 11 
7 7 8 1 12 4 8 8 3 10 
7 6 10 12 10 9 10 3 1 ...

output:

1 2 1 0 3 3 1 
2 1 2 2 2 2 2 
0 2 0 2 2 2 2 
2 0 1 4 2 2 1 
4 0 0 0 1 0 2 
1 2 2 1 2 4 2 
2 2 3 2 3 0 1 
3 1 0 3 3 0 1 
3 3 2 2 3 0 3 
1 2 3 2 2 0 3 
0 0 0 2 2 4 0 
1 2 2 2 1 2 2 
2 2 2 2 2 2 2 
0 0 3 3 3 3 3 
3 2 2 2 2 1 3 
2 4 2 2 0 2 2 
1 3 3 3 2 1 3 
1 2 2 2 2 4 3 
2 1 1 1 2 1 4 
3 3 3 0 2 0 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #43:

score: 100
Accepted
time: 2ms
memory: 3712kb

input:

300
7 8 8 2 11 11 3 12 8 9 
7 12 11 11 2 11 11 11 11 2 
7 12 11 6 8 11 11 11 11 1 
7 3 10 8 8 12 10 10 10 1 
7 10 10 1 12 10 5 8 3 10 
7 10 10 12 10 1 10 5 1 9 
7 1 11 11 8 12 8 11 11 11 
7 11 1 1 7 4 12 9 3 11 
7 11 10 2 12 11 8 11 8 11 
7 12 10 10 10 10 10 8 9 2 
7 12 10 5 9 10 9 1 9 1 
7 10 3 12 ...

output:

0 1 0 0 3 3 3 
3 3 3 3 3 3 3 
3 0 0 3 3 3 3 
2 0 2 4 2 2 0 
2 2 0 2 2 2 2 
2 2 2 2 3 1 2 
0 0 3 3 3 3 3 
2 0 3 1 2 3 3 
3 0 3 0 3 3 2 
2 2 2 2 2 0 1 
2 4 1 2 1 1 1 
2 3 3 2 1 1 3 
1 2 2 2 2 2 1 
1 0 3 3 3 3 2 
0 3 2 1 1 3 1 
2 0 1 2 0 3 3 
0 3 0 3 3 0 3 
2 2 3 0 4 0 2 
2 2 0 3 0 0 0 
0 1 3 0 3 0 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #44:

score: 100
Accepted
time: 0ms
memory: 4016kb

input:

300
7 10 1 10 10 10 12 8 9 1 
7 8 11 5 12 8 11 8 11 11 
7 10 10 9 2 11 9 7 12 6 
7 3 3 11 9 11 12 4 1 9 
7 10 4 8 7 1 6 11 11 12 
7 2 11 1 8 12 1 11 8 3 
7 10 10 2 3 11 10 8 12 8 
7 12 5 6 3 11 11 11 1 1 
7 12 8 3 11 11 4 11 11 1 
7 12 10 4 8 10 10 8 8 6 
7 12 10 4 9 10 10 8 9 6 
7 10 8 2 12 10 10 1...

output:

2 2 0 0 1 2 2 
0 3 0 3 3 0 3 
2 2 2 1 2 3 1 
1 3 1 2 1 3 3 
3 3 0 2 3 2 2 
3 0 0 2 3 3 3 
0 0 2 3 2 3 2 
1 0 1 3 3 3 4 
0 3 3 3 0 3 3 
2 3 0 2 2 0 0 
2 3 1 2 2 0 1 
2 2 2 2 2 2 0 
3 2 2 0 1 2 3 
3 3 2 3 0 2 2 
1 3 4 3 1 1 1 
4 1 1 3 1 3 1 
0 2 0 1 1 2 0 
2 2 2 2 0 2 2 
0 2 2 2 3 3 2 
1 1 2 2 1 1 4 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #45:

score: 100
Accepted
time: 0ms
memory: 3848kb

input:

300
7 12 8 10 5 1 9 11 11 3 
7 8 12 8 11 11 11 1 1 11 
7 2 10 10 10 12 5 3 9 10 
7 10 10 7 12 4 1 10 8 9 
7 1 11 6 12 11 3 8 11 1 
7 3 10 10 8 12 4 10 6 3 
7 10 10 10 10 10 4 12 10 9 
7 1 9 2 12 9 9 11 9 11 
7 10 9 4 11 10 1 12 11 2 
7 4 12 5 10 9 9 1 9 9 
7 10 10 1 12 10 9 4 1 5 
7 9 10 9 9 6 1 12 ...

output:

0 2 2 3 1 3 3 
0 0 3 3 3 4 3 
2 2 1 2 2 2 2 
1 3 2 0 1 2 2 
3 3 0 3 4 3 3 
0 0 2 2 2 2 2 
2 1 2 2 2 2 2 
1 1 3 1 3 3 1 
3 0 2 1 3 3 2 
4 3 1 1 2 1 1 
2 1 2 4 2 2 2 
3 1 1 2 1 1 2 
2 0 2 0 2 0 0 
1 0 0 2 3 2 3 
2 0 2 2 2 2 2 
1 1 2 2 2 3 1 
2 3 2 0 2 3 3 
4 0 2 3 2 3 3 
2 2 2 2 2 2 1 
2 2 1 1 1 2 1 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #46:

score: 100
Accepted
time: 0ms
memory: 3708kb

input:

300
7 11 8 11 2 11 11 2 12 11 
7 7 12 9 2 3 2 2 10 9 
7 11 8 3 11 11 2 12 2 11 
7 8 1 12 11 11 5 11 4 11 
7 11 11 8 1 11 11 11 12 11 
7 9 11 1 11 3 9 11 11 12 
7 10 5 10 10 10 12 5 9 10 
7 10 12 10 10 2 3 4 11 11 
7 10 11 2 12 11 9 6 1 11 
7 5 9 9 7 12 10 8 11 9 
7 4 8 5 7 3 10 10 10 12 
7 10 10 9 3...

output:

3 4 0 3 3 3 3 
1 4 1 3 3 2 1 
0 3 3 0 3 3 3 
0 3 2 3 3 3 3 
3 3 3 0 3 3 3 
3 3 3 1 3 1 3 
2 2 2 2 1 2 2 
2 2 3 3 2 3 3 
3 1 2 1 3 2 3 
2 2 3 1 0 1 1 
2 2 4 3 0 2 2 
2 3 2 1 2 3 3 
2 2 2 2 2 2 2 
2 2 2 2 2 2 2 
2 1 1 1 0 2 0 
3 0 3 1 3 3 3 
0 3 0 3 2 2 3 
2 1 2 1 3 3 3 
2 0 0 0 2 2 4 
3 1 3 2 3 3 0 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #47:

score: 100
Accepted
time: 2ms
memory: 3728kb

input:

300
7 10 9 3 9 10 2 12 5 5 
7 9 10 12 10 10 9 11 1 11 
7 10 8 2 12 10 10 8 10 10 
7 9 9 10 3 3 10 10 12 10 
7 10 7 1 12 8 10 8 10 8 
7 2 10 11 10 12 6 11 11 5 
7 10 3 10 8 10 2 12 11 1 
7 8 9 9 10 10 1 12 11 10 
7 7 10 9 10 12 9 2 4 11 
7 12 11 8 8 3 11 11 8 1 
7 3 10 10 8 12 10 11 11 11 
7 10 6 10 ...

output:

2 2 2 1 3 1 2 
1 2 1 2 2 3 3 
2 2 0 2 2 2 0 
2 2 1 2 1 1 2 
0 2 0 2 0 2 0 
2 2 3 2 3 2 3 
3 4 2 3 2 0 2 
3 2 0 1 1 2 2 
1 2 2 3 1 2 1 
3 0 0 1 3 3 0 
2 0 3 3 3 2 2 
2 2 4 1 2 2 2 
3 0 2 0 2 1 3 
3 3 3 3 0 0 0 
3 3 3 3 3 3 0 
2 1 1 1 2 2 2 
2 4 0 0 3 3 3 
2 2 2 2 1 2 2 
2 4 0 2 2 3 2 
3 3 3 3 3 0 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #48:

score: 100
Accepted
time: 0ms
memory: 3832kb

input:

300
7 10 10 8 2 11 11 10 12 10 
7 10 3 10 8 5 1 12 10 2 
7 10 10 2 12 9 8 8 10 10 
7 11 11 8 2 8 11 11 12 11 
7 10 3 10 10 10 12 10 10 3 
7 10 9 2 12 11 9 11 11 9 
7 2 1 10 7 11 12 9 8 11 
7 10 10 2 12 4 10 10 6 10 
7 11 7 1 12 3 10 9 9 11 
7 10 11 2 12 11 11 7 5 11 
7 11 11 11 11 5 9 9 11 12 
7 2 1...

output:

2 2 2 0 2 3 3 
2 0 2 3 2 0 2 
1 0 0 2 2 2 2 
3 3 3 0 3 0 3 
2 2 2 2 2 2 2 
3 1 3 3 1 2 1 
2 3 3 1 0 2 3 
0 2 2 2 2 2 2 
1 2 1 1 3 3 0 
3 3 2 2 3 2 3 
1 3 3 3 3 1 3 
0 3 2 0 2 2 1 
2 0 0 0 2 4 2 
1 3 3 1 1 3 2 
2 2 2 0 0 2 0 
1 3 3 3 2 3 1 
3 3 1 1 3 3 1 
2 3 0 3 4 3 0 
3 3 3 3 3 3 3 
3 3 0 0 2 2 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #49:

score: 100
Accepted
time: 0ms
memory: 3728kb

input:

300
7 10 1 12 9 9 9 11 2 11 
7 8 2 10 1 11 12 6 9 5 
7 3 9 1 10 12 10 8 11 9 
7 8 6 3 11 8 2 12 1 6 
7 10 2 10 6 10 8 11 12 8 
7 7 5 12 11 9 11 11 1 9 
7 9 2 10 10 9 5 12 1 11 
7 8 10 2 12 9 10 10 10 9 
7 3 10 12 8 10 10 10 1 3 
7 10 3 10 3 10 12 2 10 10 
7 11 8 11 1 11 11 11 12 11 
7 1 10 10 10 12 ...

output:

2 3 1 1 1 3 3 
3 3 2 2 1 2 0 
2 2 3 1 0 1 3 
1 2 0 4 3 3 0 
0 3 3 2 2 2 0 
4 1 3 3 1 1 3 
1 3 1 3 2 2 1 
1 2 2 2 1 0 2 
3 2 2 0 2 2 2 
1 2 2 1 2 2 2 
3 3 0 3 3 3 3 
2 2 2 1 0 2 2 
2 2 2 1 2 1 0 
2 1 2 2 2 2 1 
2 2 2 2 2 2 4 
2 2 3 0 0 2 2 
2 2 3 2 2 2 2 
1 3 2 2 3 3 1 
2 2 2 2 2 2 2 
3 0 0 0 2 2 1 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #50:

score: 100
Accepted
time: 0ms
memory: 3772kb

input:

300
7 10 1 10 10 10 12 2 10 9 
7 4 10 10 8 11 1 12 10 9 
7 1 8 12 11 8 11 1 1 4 
7 5 10 12 8 3 11 11 2 11 
7 11 8 11 2 8 1 11 12 2 
7 12 11 11 11 11 11 8 11 2 
7 10 10 4 12 10 2 8 10 10 
7 10 4 2 10 10 12 2 11 11 
7 8 8 1 8 11 2 12 8 10 
7 9 10 10 6 11 1 12 10 11 
7 10 10 4 12 11 11 1 11 9 
7 10 12 ...

output:

2 2 1 4 2 2 2 
2 1 3 2 2 0 3 
3 0 3 3 0 2 1 
1 2 3 0 1 3 3 
0 3 0 3 3 0 3 
3 3 3 3 3 0 3 
2 3 0 2 2 2 2 
2 2 3 1 3 3 2 
0 2 0 0 3 0 3 
2 3 1 2 2 2 3 
3 3 1 3 1 2 2 
2 2 3 2 2 4 2 
3 2 1 1 3 3 3 
1 2 0 3 2 3 3 
3 3 1 3 1 2 3 
0 4 2 2 0 0 2 
3 1 2 4 2 0 0 
1 2 2 2 2 0 2 
1 2 1 3 3 1 1 
3 3 0 3 0 3 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #51:

score: 100
Accepted
time: 3ms
memory: 3968kb

input:

300
7 11 11 5 1 11 9 11 12 11 
7 10 12 10 8 8 9 6 10 9 
7 10 8 12 11 11 8 2 3 11 
7 11 12 9 11 11 4 3 11 9 
7 10 10 12 10 10 10 11 6 9 
7 11 8 8 2 11 11 11 12 2 
7 10 10 2 12 11 11 11 11 2 
7 10 10 5 8 2 1 12 3 4 
7 10 10 12 7 8 9 11 3 10 
7 12 10 10 10 10 9 8 9 1 
7 10 12 10 10 10 7 1 10 3 
7 9 1 9...

output:

3 3 3 4 3 3 1 
2 2 0 1 0 2 1 
2 0 0 3 3 3 1 
1 3 3 0 3 3 1 
2 2 2 2 2 1 3 
0 3 0 0 3 3 3 
3 3 3 3 0 2 2 
2 2 2 2 4 0 3 
2 2 1 2 0 2 3 
2 2 2 2 1 0 1 
2 2 2 2 2 2 2 
1 3 1 3 3 1 1 
3 1 1 2 1 3 3 
2 2 2 2 1 2 1 
3 3 0 3 0 3 3 
1 4 3 3 3 3 3 
3 0 1 3 3 3 0 
2 2 0 2 1 2 2 
1 3 2 3 1 3 4 
2 2 2 1 1 3 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #52:

score: 100
Accepted
time: 3ms
memory: 3848kb

input:

300
7 8 10 10 7 11 4 12 11 2 
7 11 10 2 12 9 9 11 4 9 
7 6 8 10 8 11 1 12 11 11 
7 4 12 10 10 4 10 1 1 6 
7 8 5 1 12 11 11 7 11 11 
7 10 12 10 10 10 10 1 5 10 
7 1 9 10 4 12 11 11 9 11 
7 1 10 10 10 12 10 10 1 10 
7 10 2 10 11 8 12 11 8 3 
7 11 11 9 11 2 8 11 11 12 
7 12 10 9 7 8 11 8 11 2 
7 10 10 ...

output:

3 0 0 2 2 2 3 
1 1 3 2 1 3 2 
3 3 1 0 2 0 3 
2 3 0 2 2 4 2 
3 3 2 3 3 0 1 
2 2 2 2 2 2 2 
3 4 1 3 3 1 2 
2 2 4 2 2 2 2 
3 0 2 3 0 2 2 
3 3 1 3 3 0 3 
2 1 2 0 3 0 3 
2 2 3 2 3 0 3 
3 0 2 2 3 3 3 
3 0 3 2 3 1 2 
1 2 3 3 0 1 2 
3 3 0 3 3 3 2 
3 3 1 1 0 0 3 
3 1 3 0 2 3 2 
2 2 2 0 2 2 4 
2 2 2 1 2 2 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #53:

score: 100
Accepted
time: 3ms
memory: 3764kb

input:

300
7 5 10 8 11 12 10 11 8 8 
7 7 10 3 12 9 10 10 10 5 
7 12 10 10 2 10 10 11 8 1 
7 1 10 5 11 12 10 11 11 9 
7 10 8 12 10 3 5 8 7 11 
7 10 1 10 8 10 12 10 10 10 
7 8 12 5 11 11 3 5 11 11 
7 4 10 8 12 10 10 10 10 10 
7 10 4 4 11 11 12 11 9 9 
7 12 10 9 4 9 5 7 10 2 
7 12 10 10 5 10 5 9 9 2 
7 8 11 9...

output:

2 3 0 0 3 2 0 
1 2 2 2 2 4 2 
2 2 3 2 2 3 0 
2 3 3 1 3 2 4 
2 0 0 2 3 3 0 
0 2 2 2 2 2 2 
4 0 3 3 3 3 3 
2 2 2 2 2 3 2 
3 3 1 3 1 3 2 
2 1 4 1 2 2 2 
2 2 2 2 2 1 1 
3 3 1 0 3 3 3 
2 3 2 3 3 3 2 
3 0 3 0 0 3 0 
2 2 3 3 3 0 1 
0 3 3 3 1 3 1 
2 0 2 2 0 0 0 
3 0 0 0 3 3 3 
2 0 2 0 2 3 0 
1 3 3 3 1 3 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #54:

score: 100
Accepted
time: 1ms
memory: 4000kb

input:

300
7 11 9 12 6 11 11 11 1 9 
7 8 9 10 8 2 11 10 11 12 
7 12 4 10 11 4 11 9 11 1 
7 3 10 8 4 12 6 8 11 11 
7 4 12 1 11 11 11 2 11 11 
7 5 9 11 9 1 9 9 11 12 
7 8 8 8 3 11 11 11 12 8 
7 2 10 10 10 12 7 10 8 7 
7 8 1 1 1 6 12 8 11 11 
7 4 10 10 10 12 1 8 8 1 
7 10 10 2 12 8 9 8 10 2 
7 1 9 10 8 12 11 ...

output:

3 1 3 2 3 1 3 
2 3 2 0 1 3 0 
3 2 3 0 3 1 3 
2 4 3 3 0 2 0 
3 3 3 3 3 3 3 
1 3 3 1 1 1 1 
0 3 0 0 0 3 3 
2 2 0 2 2 2 2 
3 2 3 0 3 3 0 
3 2 0 4 0 2 2 
0 1 0 2 0 2 2 
3 0 1 2 1 1 2 
2 2 2 2 0 0 2 
2 0 2 2 2 3 2 
0 2 2 0 2 2 3 
4 2 2 2 2 2 1 
2 4 2 2 1 3 1 
3 3 0 2 2 2 2 
3 3 3 3 0 1 3 
3 3 3 3 3 3 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #55:

score: 100
Accepted
time: 0ms
memory: 3772kb

input:

300
7 9 10 3 12 10 10 2 10 10 
7 10 10 3 12 10 10 10 8 8 
7 1 10 9 8 12 9 6 11 11 
7 8 10 10 8 3 10 10 8 12 
7 10 12 10 2 10 2 1 9 10 
7 10 12 10 8 8 8 2 6 11 
7 10 11 12 11 11 11 9 1 11 
7 11 10 8 10 8 4 12 3 11 
7 12 10 10 8 9 10 9 9 2 
7 8 6 12 11 8 9 11 3 9 
7 10 2 11 10 9 12 5 11 11 
7 10 10 1 ...

output:

2 2 1 2 2 1 2 
2 2 2 0 0 2 2 
1 0 3 3 2 2 1 
2 0 2 0 2 2 0 
2 2 2 3 3 1 2 
2 2 0 0 0 2 3 
2 3 3 3 3 3 1 
0 3 3 2 0 2 0 
2 2 0 1 2 1 1 
0 4 1 3 0 1 3 
2 1 3 2 3 3 2 
2 0 2 2 2 2 2 
1 2 2 2 2 0 2 
3 3 3 0 3 3 3 
3 3 3 0 3 3 0 
3 3 2 1 2 3 1 
3 3 3 3 3 3 3 
3 1 3 0 2 3 3 
2 1 1 2 2 1 2 
2 1 2 3 3 2 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #56:

score: 100
Accepted
time: 3ms
memory: 3660kb

input:

300
7 6 10 10 9 12 9 4 1 9 
7 9 9 8 12 9 9 9 9 9 
7 2 9 8 8 12 10 11 11 6 
7 10 12 10 10 10 10 3 9 10 
7 2 9 11 9 12 9 9 11 11 
7 10 10 12 10 9 1 10 2 9 
7 11 11 12 1 11 11 11 3 11 
7 10 1 10 10 10 12 10 11 8 
7 8 11 11 11 1 11 4 8 12 
7 8 12 8 10 10 8 6 10 11 
7 12 8 8 3 10 9 11 11 4 
7 8 1 9 11 11...

output:

1 1 1 1 2 2 2 
1 1 1 1 1 1 1 
2 0 3 2 3 1 0 
2 2 2 2 2 1 2 
1 1 3 3 1 1 3 
2 2 3 2 1 1 2 
3 3 3 3 3 3 3 
2 2 0 2 3 2 2 
2 0 3 0 3 3 3 
0 0 2 0 2 2 3 
0 0 3 2 1 3 3 
3 3 3 0 1 1 0 
2 2 2 2 2 2 2 
3 2 3 2 2 2 3 
0 0 3 0 2 2 0 
3 3 3 3 3 3 3 
2 3 2 0 2 1 2 
2 2 3 3 2 1 1 
3 3 3 3 0 3 3 
2 2 2 1 1 1 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #57:

score: 100
Accepted
time: 2ms
memory: 3764kb

input:

300
7 11 5 9 2 11 1 11 12 11 
7 12 10 10 10 10 10 10 10 4 
7 12 11 11 11 11 11 11 11 1 
7 4 10 5 11 4 10 8 11 12 
7 11 4 3 12 11 11 11 9 11 
7 1 10 10 10 12 10 6 10 10 
7 4 10 10 10 2 9 10 4 12 
7 8 8 11 8 2 11 11 11 12 
7 10 10 10 10 10 4 12 10 10 
7 8 10 12 8 10 11 11 1 11 
7 10 12 10 11 9 5 1 9 1...

output:

3 3 1 1 3 3 3 
2 2 2 2 2 2 2 
3 3 3 3 3 3 3 
0 3 4 3 2 2 3 
3 3 3 1 3 3 3 
2 2 2 2 2 2 2 
2 2 2 3 2 1 2 
3 3 3 0 0 3 0 
2 2 2 2 2 2 2 
0 2 3 0 2 3 3 
2 2 1 2 3 1 3 
2 2 3 0 0 0 2 
1 2 3 2 2 3 2 
2 3 1 3 1 1 2 
0 0 0 3 3 3 3 
3 2 3 3 3 2 2 
1 2 2 2 2 2 4 
2 1 0 2 1 2 2 
3 1 3 3 3 2 1 
1 2 3 2 1 3 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #58:

score: 100
Accepted
time: 0ms
memory: 3764kb

input:

300
7 10 12 4 10 9 10 8 11 10 
7 10 10 12 3 9 10 10 3 11 
7 10 2 10 10 10 12 10 10 10 
7 11 11 12 10 8 1 8 3 11 
7 8 10 10 5 12 9 9 11 10 
7 8 9 10 9 11 5 12 11 7 
7 4 8 9 3 12 3 1 8 11 
7 3 10 10 8 11 9 9 12 11 
7 11 9 2 12 9 11 11 11 9 
7 10 12 10 11 10 11 6 10 9 
7 10 10 8 2 10 9 8 12 10 
7 8 1 8...

output:

3 2 1 2 2 3 2 
2 2 2 1 1 3 2 
2 2 2 2 2 2 2 
3 3 3 2 0 3 0 
1 4 3 2 1 2 2 
3 2 0 1 2 1 3 
3 3 0 3 1 0 1 
3 1 2 2 3 3 1 
1 3 3 3 1 3 1 
2 2 2 3 3 2 1 
2 0 2 0 2 2 1 
3 2 0 0 3 0 3 
3 3 3 3 3 3 3 
2 2 1 1 2 0 3 
3 2 3 3 3 3 3 
0 3 4 2 0 0 3 
3 3 3 0 3 3 3 
2 2 2 2 2 2 2 
0 3 1 3 3 0 0 
2 2 2 2 2 2 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #59:

score: 100
Accepted
time: 0ms
memory: 3848kb

input:

300
7 10 3 10 11 8 12 11 11 11 
7 10 8 10 2 3 8 10 12 1 
7 4 8 8 9 1 10 10 10 12 
7 8 10 10 1 10 9 10 12 8 
7 11 12 11 11 11 9 2 11 11 
7 11 10 9 11 6 11 9 9 12 
7 3 8 11 11 12 10 10 10 2 
7 1 4 11 1 12 9 1 9 9 
7 3 1 9 11 3 12 11 11 9 
7 1 8 11 10 12 11 11 11 11 
7 12 10 10 8 10 7 9 3 3 
7 11 10 11...

output:

3 0 3 3 3 2 2 
4 2 0 2 2 1 0 
2 2 0 3 0 2 1 
0 2 2 2 0 2 1 
3 3 3 1 3 3 3 
1 1 1 3 2 3 3 
2 3 2 0 2 0 3 
1 3 1 1 1 3 3 
3 1 1 3 3 1 3 
3 2 3 3 3 0 3 
2 2 0 2 2 1 2 
3 3 3 2 3 2 1 
2 2 2 2 2 2 1 
3 3 2 2 2 3 3 
3 0 3 0 3 3 3 
2 2 2 2 2 2 2 
2 3 3 2 2 3 4 
1 2 3 3 3 3 2 
1 3 1 1 3 3 2 
0 3 2 3 0 3 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #60:

score: 100
Accepted
time: 2ms
memory: 3716kb

input:

300
7 2 2 1 12 11 11 11 11 11 
7 9 4 11 11 11 12 11 11 11 
7 3 10 11 11 12 11 11 9 11 
7 9 11 11 9 3 11 11 11 12 
7 9 9 11 9 9 1 12 9 11 
7 6 11 2 12 11 11 11 11 8 
7 8 10 10 8 10 2 12 10 11 
7 12 10 10 10 10 9 11 6 8 
7 7 1 10 1 11 11 8 12 11 
7 10 11 12 11 11 11 8 3 11 
7 1 10 10 10 12 10 8 5 10 
...

output:

3 3 3 3 3 3 3 
3 3 3 3 3 3 1 
3 3 1 3 3 2 3 
3 3 3 1 3 3 1 
1 3 1 1 3 1 1 
3 3 3 3 0 1 3 
2 3 0 2 2 0 2 
2 2 2 2 1 3 2 
3 0 3 2 4 3 3 
2 3 3 3 3 3 0 
2 2 2 2 0 2 2 
1 2 1 1 2 1 2 
3 2 4 1 0 2 2 
2 2 2 2 2 1 2 
3 3 3 3 3 0 3 
1 1 1 3 4 1 3 
2 2 0 0 0 3 2 
3 1 1 1 1 3 3 
3 2 2 2 1 2 1 
1 2 3 2 3 1 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #61:

score: 100
Accepted
time: 0ms
memory: 3836kb

input:

300
7 10 8 2 12 8 10 8 8 1 
7 12 10 11 10 10 8 11 10 1 
7 10 4 10 10 10 12 8 5 10 
7 12 10 10 10 10 9 8 3 1 
7 10 10 10 10 10 2 12 8 10 
7 9 12 9 10 11 5 1 7 11 
7 10 3 10 10 10 12 10 10 10 
7 10 10 9 10 4 10 10 10 12 
7 8 8 12 8 11 11 11 1 11 
7 10 5 10 10 2 11 11 11 12 
7 1 11 1 12 10 9 11 11 11 
...

output:

0 2 0 0 4 2 0 
2 3 2 2 0 3 2 
2 2 2 0 2 2 2 
2 2 2 2 1 0 2 
0 2 2 2 2 2 2 
1 1 3 2 2 2 3 
2 2 2 2 2 2 2 
2 2 1 2 2 2 2 
0 0 3 0 3 3 3 
3 3 2 2 1 3 2 
2 1 3 3 3 3 3 
0 3 2 2 2 3 3 
2 1 0 4 2 1 2 
2 3 1 3 3 3 3 
2 2 2 1 0 2 0 
3 2 2 2 2 2 0 
3 1 2 2 2 2 3 
0 0 0 3 0 3 2 
3 2 3 1 1 2 2 
2 2 3 3 1 1 1 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #62:

score: 100
Accepted
time: 2ms
memory: 3760kb

input:

300
7 10 12 9 9 10 9 1 3 9 
7 10 8 1 12 10 10 10 9 9 
7 10 10 10 8 7 10 10 12 9 
7 4 12 10 8 2 6 1 11 6 
7 11 2 1 12 11 9 4 11 11 
7 10 10 10 7 8 6 8 8 12 
7 10 12 9 2 7 10 3 9 10 
7 10 10 2 12 10 10 10 10 10 
7 3 4 12 4 10 10 8 5 7 
7 10 10 3 12 4 10 10 10 10 
7 10 10 10 10 10 4 12 10 10 
7 3 12 10...

output:

1 2 2 1 1 2 1 
2 2 2 1 1 2 0 
1 2 2 2 2 2 2 
2 3 3 2 0 3 2 
3 1 2 3 3 3 3 
0 0 2 2 2 2 2 
1 2 2 2 3 1 2 
2 2 2 2 2 2 2 
3 3 2 1 2 2 0 
0 2 2 2 2 2 2 
2 2 2 2 2 2 2 
2 3 1 1 3 1 1 
1 1 1 3 3 3 2 
3 4 0 3 2 0 3 
3 3 3 3 3 3 3 
3 3 3 3 0 3 3 
1 2 2 1 1 2 2 
1 2 1 2 2 2 1 
1 0 3 1 3 3 4 
3 3 0 3 3 3 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #63:

score: 100
Accepted
time: 2ms
memory: 3712kb

input:

300
7 12 11 11 8 11 2 11 11 5 
7 10 11 12 11 10 6 6 2 9 
7 3 1 9 11 6 12 3 11 11 
7 10 1 10 9 11 12 9 11 9 
7 1 10 10 10 12 10 8 8 4 
7 9 10 8 12 10 10 10 10 9 
7 10 12 10 10 10 10 3 5 10 
7 11 9 2 12 9 11 11 9 11 
7 12 8 11 11 11 8 11 11 8 
7 8 8 8 8 10 12 11 10 10 
7 10 12 10 10 10 10 2 9 10 
7 10...

output:

3 3 0 3 3 3 3 
2 3 2 3 2 1 2 
3 2 3 2 3 1 3 
1 3 1 1 3 2 2 
2 2 0 2 0 2 2 
2 2 2 2 1 1 2 
2 2 2 2 2 2 2 
1 3 3 1 3 3 1 
0 3 3 3 0 3 3 
0 2 2 3 2 0 0 
2 2 2 2 2 1 2 
2 2 2 2 1 1 2 
2 2 2 2 2 2 2 
3 0 2 0 3 2 3 
3 1 1 3 3 3 3 
0 2 0 0 3 3 2 
2 2 2 2 2 2 2 
3 3 3 3 3 3 0 
1 2 1 2 2 1 2 
2 4 2 0 2 0 1 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #64:

score: 100
Accepted
time: 3ms
memory: 3776kb

input:

300
7 2 10 10 10 12 10 10 3 10 
7 10 12 8 11 8 11 2 8 8 
7 12 8 9 2 3 1 11 11 3 
7 8 2 8 8 11 11 11 12 11 
7 8 7 10 10 12 8 10 11 11 
7 10 5 11 11 9 1 12 11 11 
7 12 11 1 11 11 11 11 11 4 
7 7 4 11 5 2 1 11 11 12 
7 11 11 12 3 11 2 1 4 11 
7 11 4 11 11 1 8 11 11 12 
7 4 9 10 10 12 9 11 11 10 
7 10 1...

output:

2 2 2 2 2 2 2 
0 2 0 3 3 0 0 
0 1 3 1 3 3 3 
3 3 3 0 0 3 3 
0 2 3 3 2 4 2 
3 3 2 1 3 3 1 
3 3 3 3 3 3 3 
3 3 3 4 3 3 2 
3 3 3 3 3 3 1 
3 3 3 3 3 0 3 
1 2 3 2 3 1 2 
3 1 2 2 2 2 1 
3 3 2 2 3 3 1 
3 3 3 3 0 0 3 
2 2 2 4 2 2 2 
1 3 3 3 3 3 3 
2 3 2 2 1 2 2 
3 3 3 0 3 3 3 
1 3 3 3 3 3 3 
0 2 2 2 3 3 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #65:

score: 100
Accepted
time: 2ms
memory: 3764kb

input:

300
7 1 11 10 11 12 10 11 11 10 
7 12 8 7 8 3 8 2 8 1 
7 11 11 11 11 11 8 12 11 11 
7 1 9 10 5 12 10 11 11 11 
7 10 10 12 9 9 10 4 2 5 
7 5 12 11 11 8 11 2 2 8 
7 9 12 9 9 11 11 6 11 11 
7 8 10 10 1 11 10 11 12 8 
7 10 4 10 9 10 12 9 9 11 
7 8 11 12 11 11 11 11 1 11 
7 8 11 11 4 11 10 11 12 1 
7 12 ...

output:

2 3 3 2 3 3 2 
0 0 0 1 0 4 0 
3 3 3 3 3 3 3 
2 2 3 3 3 1 2 
2 2 2 1 1 2 2 
3 1 0 3 3 0 0 
1 1 3 3 1 3 3 
0 3 2 2 0 3 2 
1 2 3 1 1 2 2 
0 3 3 3 3 3 3 
4 3 3 3 0 3 2 
3 0 3 3 3 0 3 
0 3 3 3 3 2 0 
2 2 2 2 2 2 2 
3 3 3 3 3 3 3 
2 2 0 2 2 1 2 
3 1 1 2 2 2 2 
1 2 1 2 3 1 2 
3 3 0 0 0 3 3 
2 2 2 0 3 2 1 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #66:

score: 100
Accepted
time: 2ms
memory: 3772kb

input:

300
7 10 10 10 1 10 9 10 12 11 
7 10 12 8 10 10 10 5 10 8 
7 10 10 1 12 10 10 9 10 9 
7 8 10 10 10 12 10 10 9 10 
7 10 3 10 10 10 12 10 10 10 
7 11 8 1 12 8 11 11 11 11 
7 8 5 1 12 7 8 4 11 11 
7 10 10 1 12 10 9 10 10 10 
7 8 2 10 5 1 6 12 1 4 
7 12 8 11 11 9 1 11 11 3 
7 10 10 3 12 10 10 8 10 10 
7...

output:

3 2 2 2 2 2 1 
0 2 2 2 2 2 0 
2 2 1 2 1 2 2 
2 2 1 2 2 2 2 
2 2 2 2 2 2 2 
0 3 3 3 3 3 0 
2 0 2 3 3 0 1 
2 1 2 2 2 2 2 
1 2 0 3 2 4 3 
0 3 3 1 3 3 3 
2 2 0 2 2 2 2 
2 2 2 2 2 2 2 
3 0 3 1 3 3 3 
0 0 0 2 0 0 2 
3 3 2 2 3 3 1 
2 0 2 0 2 2 0 
1 3 3 1 3 3 3 
2 4 2 2 1 2 2 
3 3 0 0 3 3 3 
2 2 2 2 2 2 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #67:

score: 100
Accepted
time: 2ms
memory: 3932kb

input:

300
7 10 10 2 12 10 10 10 10 10 
7 1 10 8 6 12 5 8 1 8 
7 12 10 5 9 10 10 8 11 2 
7 10 8 2 12 10 11 8 11 11 
7 10 12 10 8 8 10 5 8 10 
7 8 10 3 1 10 11 8 12 8 
7 12 8 10 11 8 10 11 11 1 
7 11 11 11 11 8 3 12 11 9 
7 12 10 9 10 10 10 10 10 2 
7 8 6 11 2 8 11 11 12 11 
7 10 10 5 12 10 10 10 1 2 
7 8 1...

output:

2 2 2 2 2 2 2 
2 2 4 0 0 2 0 
2 4 1 2 2 0 3 
2 3 0 3 3 2 0 
2 2 0 2 0 0 2 
0 0 2 3 0 2 3 
0 2 3 0 2 3 3 
3 1 3 3 3 3 0 
2 1 2 2 2 2 2 
3 3 4 3 0 0 3 
2 2 2 1 0 2 2 
3 3 0 2 2 0 0 
2 2 0 2 2 2 1 
2 2 1 2 3 1 3 
1 2 2 2 2 2 2 
1 3 3 3 3 3 3 
3 3 3 1 2 2 3 
3 3 2 2 2 3 2 
3 1 1 1 3 2 3 
2 2 2 1 1 2 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #68:

score: 100
Accepted
time: 0ms
memory: 3716kb

input:

300
7 10 10 12 2 5 11 11 1 9 
7 9 11 11 9 1 9 11 11 12 
7 1 10 10 6 12 10 10 10 10 
7 3 8 10 11 12 11 11 11 1 
7 8 10 10 11 10 1 12 11 10 
7 10 10 3 1 9 3 10 12 11 
7 10 10 12 9 9 10 9 1 11 
7 10 10 12 11 10 4 11 6 11 
7 11 1 9 11 11 12 11 9 11 
7 12 10 10 8 10 1 4 8 2 
7 8 10 12 11 11 11 10 1 9 
7 ...

output:

2 2 3 3 2 1 3 
3 3 3 1 3 1 1 
2 2 2 2 2 2 2 
3 3 3 4 3 0 2 
3 2 0 2 2 3 2 
3 2 2 3 2 1 4 
2 2 2 1 1 3 1 
2 2 4 3 2 3 3 
3 3 3 3 1 1 3 
2 2 0 2 3 2 0 
0 2 3 3 3 1 2 
2 2 2 2 2 2 2 
4 3 3 0 3 2 3 
2 1 1 2 2 2 2 
3 1 1 2 2 3 3 
0 3 3 0 2 3 0 
3 3 3 3 3 3 3 
3 0 3 0 0 3 3 
3 2 3 2 2 2 2 
2 2 2 2 2 2 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #69:

score: 100
Accepted
time: 2ms
memory: 3840kb

input:

300
7 5 10 9 3 10 11 11 12 11 
7 10 10 1 12 10 9 10 10 10 
7 10 7 8 3 3 9 8 2 12 
7 10 10 10 5 10 10 8 12 10 
7 10 12 10 10 7 10 1 10 8 
7 8 10 9 1 10 8 10 12 9 
7 12 11 10 11 10 10 10 10 3 
7 10 10 12 10 1 2 8 2 9 
7 11 3 1 12 11 11 11 11 9 
7 10 12 10 10 5 3 2 8 11 
7 10 10 10 10 10 6 12 10 10 
7 ...

output:

3 3 2 1 1 2 3 
2 1 2 2 2 2 2 
0 4 0 2 0 1 1 
2 0 2 2 2 2 2 
2 2 2 2 2 2 0 
1 2 2 1 0 2 0 
3 2 3 2 2 2 2 
2 2 3 2 3 1 0 
3 3 3 3 1 3 3 
2 2 2 4 2 0 3 
2 2 2 2 2 2 2 
3 3 1 3 3 3 3 
3 3 3 3 3 3 3 
2 3 3 0 0 2 0 
2 2 2 3 2 1 2 
2 2 2 2 2 2 2 
3 4 0 1 3 3 3 
0 2 2 2 2 2 2 
2 2 2 2 2 0 2 
3 3 3 3 3 3 0 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #70:

score: 100
Accepted
time: 3ms
memory: 3836kb

input:

300
7 10 11 10 11 3 11 11 9 12 
7 10 6 3 12 10 6 10 10 10 
7 11 1 9 9 7 12 11 11 11 
7 8 8 1 12 11 11 11 11 11 
7 12 11 10 11 11 6 10 10 3 
7 10 10 2 12 10 10 8 3 10 
7 1 6 6 9 12 10 10 10 10 
7 10 12 10 10 5 10 5 10 9 
7 3 12 10 8 11 8 1 10 8 
7 10 10 10 10 2 10 10 10 12 
7 7 2 10 10 10 12 3 10 9 
...

output:

3 1 2 2 3 3 3 
2 2 2 2 2 2 4 
1 2 3 3 3 1 3 
3 3 3 3 3 0 0 
3 2 3 3 2 2 2 
2 2 0 2 2 2 2 
2 1 2 2 2 4 0 
2 2 2 2 2 2 1 
2 3 3 0 0 2 0 
2 2 2 2 2 2 2 
2 2 1 2 2 2 4 
3 4 3 1 3 1 3 
3 1 1 2 2 2 2 
3 2 1 2 2 2 3 
1 1 3 2 1 1 2 
1 2 2 2 2 0 3 
3 3 1 3 2 3 0 
2 2 3 2 2 2 2 
2 0 3 3 4 1 3 
3 1 1 1 1 1 1 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #71:

score: 100
Accepted
time: 0ms
memory: 3728kb

input:

300
7 10 12 10 10 10 10 1 10 6 
7 10 4 10 10 10 12 10 10 10 
7 11 12 10 11 11 11 3 11 4 
7 2 8 10 11 12 11 8 11 8 
7 10 12 8 11 11 8 5 10 10 
7 8 12 11 8 11 8 3 8 8 
7 10 10 8 12 10 9 8 10 8 
7 10 4 10 10 10 12 10 9 11 
7 10 10 10 3 10 9 10 12 10 
7 10 10 10 10 4 10 10 10 12 
7 11 10 8 12 11 8 11 10...

output:

2 2 2 2 2 2 2 
2 2 2 2 2 2 2 
2 3 3 3 3 3 2 
3 3 3 0 0 0 2 
0 2 3 0 3 2 2 
3 0 3 0 0 0 0 
2 1 0 2 0 2 2 
2 2 3 2 1 2 2 
2 2 2 2 2 2 1 
2 2 2 2 2 2 2 
3 0 3 2 0 3 2 
2 2 2 2 2 2 2 
3 1 3 3 1 3 1 
3 3 1 1 2 3 3 
3 1 3 3 3 1 1 
1 2 2 2 2 2 2 
1 3 3 3 3 3 3 
0 2 2 2 3 3 3 
3 2 2 2 2 3 2 
1 3 3 1 2 3 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #72:

score: 100
Accepted
time: 2ms
memory: 3836kb

input:

300
7 2 8 11 8 12 11 11 4 11 
7 10 12 9 3 8 8 5 10 2 
7 10 10 10 1 6 9 11 12 10 
7 11 1 10 11 8 12 7 11 8 
7 11 10 8 11 11 2 12 11 11 
7 10 10 10 9 1 10 11 10 12 
7 11 11 4 12 11 2 11 1 11 
7 10 1 10 4 10 12 10 10 10 
7 11 11 11 1 9 11 7 12 9 
7 8 9 8 11 1 8 10 8 12 
7 10 1 9 10 11 12 10 11 11 
7 8 ...

output:

3 0 2 3 3 0 3 
1 2 0 0 3 2 0 
2 3 2 2 2 2 1 
3 0 0 2 3 2 3 
3 3 3 2 0 3 3 
3 2 2 2 2 2 1 
3 3 3 1 3 3 3 
4 2 2 2 2 2 2 
1 2 3 3 3 1 3 
2 0 0 0 1 0 3 
2 3 3 2 3 1 2 
3 0 0 0 2 3 3 
1 3 0 2 1 2 1 
3 0 3 0 3 1 3 
3 3 3 1 3 1 1 
3 3 3 3 3 1 3 
2 2 2 2 1 1 2 
3 3 0 3 0 1 3 
2 2 3 2 2 1 2 
0 0 3 3 3 3 0 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #73:

score: 100
Accepted
time: 0ms
memory: 3712kb

input:

300
7 1 8 11 8 12 10 11 11 11 
7 10 10 12 9 10 9 10 2 10 
7 9 12 9 4 3 9 2 9 11 
7 10 12 10 9 10 10 8 11 9 
7 8 10 10 5 4 8 8 3 12 
7 10 10 12 10 10 10 9 1 10 
7 11 11 11 1 2 11 11 11 12 
7 11 11 12 11 9 11 11 1 9 
7 8 12 10 10 8 10 1 8 10 
7 8 10 8 8 1 7 8 11 12 
7 11 11 11 11 11 2 12 11 11 
7 9 9 ...

output:

2 0 3 3 3 0 3 
2 2 1 1 2 2 2 
1 1 1 1 4 1 3 
2 2 2 2 1 3 1 
0 0 2 0 2 0 2 
2 2 2 2 2 2 1 
3 3 3 3 3 3 3 
3 3 3 3 1 1 3 
2 0 0 2 2 0 2 
0 3 0 0 2 2 0 
3 3 3 3 3 3 3 
3 1 1 1 1 1 1 
3 1 1 2 2 2 3 
3 3 3 3 3 3 3 
2 3 3 1 3 1 3 
2 2 2 2 2 1 2 
3 1 1 2 2 3 3 
3 3 3 3 3 3 3 
2 2 2 2 2 2 2 
3 2 4 3 3 3 1 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #74:

score: 100
Accepted
time: 0ms
memory: 3728kb

input:

300
7 4 3 1 12 11 6 11 3 11 
7 8 10 8 5 8 10 11 12 11 
7 10 10 10 11 8 7 12 2 3 
7 10 12 8 8 10 10 4 8 2 
7 10 10 2 12 10 10 7 10 9 
7 8 10 1 12 10 10 8 10 10 
7 1 11 9 11 12 4 11 11 11 
7 11 12 11 11 2 11 3 8 11 
7 8 10 11 11 1 7 11 11 12 
7 10 10 6 10 8 1 12 10 10 
7 12 10 10 8 5 8 10 10 1 
7 11 1...

output:

3 2 3 2 3 3 3 
3 3 2 0 0 0 2 
4 0 2 2 2 3 0 
0 2 2 2 0 0 0 
2 2 2 2 1 2 2 
2 2 0 2 2 0 2 
0 3 3 3 3 3 1 
3 3 3 3 3 0 3 
3 3 3 0 2 2 3 
2 2 2 2 0 2 0 
2 2 0 2 0 2 2 
3 2 3 0 3 3 1 
2 2 2 2 0 2 2 
1 2 2 2 2 2 3 
2 1 3 4 2 2 3 
1 3 3 3 3 3 1 
3 2 3 2 1 1 3 
0 3 0 0 3 3 0 
2 0 3 3 0 3 2 
2 2 0 2 0 2 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #75:

score: 100
Accepted
time: 0ms
memory: 3704kb

input:

300
7 7 9 9 8 10 5 12 10 11 
7 1 9 9 9 1 9 11 11 12 
7 9 8 2 12 8 10 3 10 10 
7 10 10 10 10 10 5 12 9 10 
7 10 10 12 11 10 9 11 6 11 
7 9 11 10 8 7 11 8 12 11 
7 10 9 10 3 10 11 10 12 10 
7 10 10 10 5 10 10 10 12 9 
7 9 10 12 11 9 9 9 1 9 
7 12 5 4 8 10 11 11 11 1 
7 4 11 11 11 12 11 8 11 11 
7 10 1...

output:

2 3 4 1 1 0 2 
3 3 1 3 1 1 1 
0 2 2 2 2 1 0 
1 2 2 2 2 2 2 
2 2 1 3 2 3 3 
3 0 3 2 1 2 3 
2 2 1 2 2 2 3 
1 2 2 2 2 2 2 
1 2 1 3 1 1 1 
1 3 0 2 3 3 3 
3 3 3 3 0 3 3 
2 2 2 2 2 2 2 
3 3 3 3 3 3 0 
0 3 3 3 0 3 0 
3 2 2 1 0 2 2 
3 3 0 3 0 0 0 
2 2 2 0 2 2 1 
1 3 1 3 3 3 3 
2 2 2 2 2 2 2 
2 1 2 1 2 1 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #76:

score: 100
Accepted
time: 3ms
memory: 4008kb

input:

300
7 4 2 1 12 7 3 11 9 11 
7 11 3 9 9 7 12 11 9 11 
7 10 10 9 1 9 10 10 12 8 
7 12 10 10 9 2 5 9 11 3 
7 10 10 1 12 10 10 10 10 8 
7 8 10 10 1 10 11 8 12 11 
7 8 11 2 12 1 11 11 9 8 
7 7 10 10 10 12 10 10 10 10 
7 10 9 6 12 11 9 4 10 11 
7 10 1 10 4 10 12 10 10 8 
7 10 10 10 4 10 10 10 12 10 
7 9 9...

output:

2 4 3 1 3 3 3 
1 2 3 3 1 1 3 
0 2 2 1 2 1 2 
2 2 1 3 2 1 3 
2 2 2 2 0 2 2 
3 0 2 2 0 2 3 
3 3 3 1 0 0 3 
2 2 2 2 2 2 2 
3 1 2 2 3 2 1 
4 2 0 2 2 2 2 
2 2 2 2 2 2 2 
1 1 1 1 1 2 1 
3 3 1 1 2 2 3 
2 2 2 2 2 2 2 
3 3 3 3 3 3 3 
3 2 3 2 3 0 0 
0 3 2 3 2 0 3 
2 2 2 2 1 2 0 
2 2 3 3 3 3 0 
2 3 2 2 3 2 4 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #77:

score: 100
Accepted
time: 0ms
memory: 3776kb

input:

300
7 12 10 10 10 8 10 8 8 4 
7 11 9 11 11 11 1 12 11 11 
7 10 2 10 8 10 12 8 10 10 
7 10 12 10 1 10 10 3 10 8 
7 11 9 1 12 4 11 11 11 11 
7 1 11 1 11 12 1 11 11 11 
7 12 11 11 11 11 11 11 11 3 
7 5 1 5 12 4 9 11 11 8 
7 2 10 11 11 12 10 11 10 8 
7 10 12 10 10 10 10 4 10 10 
7 10 10 3 12 10 10 10 10...

output:

2 2 2 0 2 0 0 
3 3 3 1 3 3 3 
0 2 2 0 2 2 2 
2 2 2 2 3 2 0 
0 3 3 3 3 3 1 
3 3 3 3 3 3 3 
3 3 3 3 3 3 3 
1 1 3 3 0 1 3 
2 3 2 0 3 2 3 
2 2 2 2 2 2 2 
2 2 2 2 0 2 2 
2 0 0 2 2 2 2 
1 3 3 3 3 3 3 
3 3 3 1 3 3 1 
3 3 3 1 3 1 3 
3 3 0 3 3 3 0 
3 1 1 3 3 3 3 
2 2 1 3 2 1 1 
1 3 3 3 3 3 3 
3 1 2 3 3 3 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #78:

score: 100
Accepted
time: 0ms
memory: 3928kb

input:

300
7 10 1 11 2 4 11 3 9 12 
7 3 11 12 11 11 11 11 1 11 
7 11 6 10 11 11 12 11 10 9 
7 11 11 5 5 10 10 10 12 11 
7 12 9 10 10 10 10 10 10 1 
7 11 9 3 10 1 11 9 9 12 
7 11 9 6 11 11 2 12 11 11 
7 11 11 12 10 8 10 10 2 11 
7 2 1 10 3 12 10 11 11 10 
7 2 10 9 11 12 8 11 11 11 
7 1 5 11 8 12 11 11 11 11...

output:

4 1 3 2 3 3 3 
3 3 3 3 3 3 3 
3 3 1 3 2 2 3 
3 2 3 4 3 2 2 
1 2 2 2 2 2 2 
1 1 3 3 1 3 2 
3 3 3 1 0 3 3 
3 3 2 2 0 3 2 
2 1 3 2 3 3 2 
0 3 3 3 3 2 1 
3 0 3 3 3 1 3 
1 2 2 0 3 2 2 
0 1 1 3 3 2 3 
2 2 2 2 2 2 2 
3 3 3 3 0 3 3 
2 2 3 0 0 2 0 
3 3 3 3 3 3 3 
2 2 0 3 0 0 0 
1 0 2 2 2 2 1 
0 3 2 2 0 2 0 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #79:

score: 100
Accepted
time: 2ms
memory: 4012kb

input:

300
7 12 9 10 11 10 10 11 11 2 
7 5 11 9 8 12 11 11 11 11 
7 8 10 3 12 10 10 10 8 10 
7 9 11 12 9 11 9 10 1 3 
7 10 10 12 10 10 10 10 2 9 
7 4 10 10 10 12 10 6 9 9 
7 10 10 10 8 5 10 11 8 12 
7 10 2 11 8 11 8 11 12 11 
7 10 4 9 10 3 12 11 8 11 
7 10 10 5 12 10 10 10 10 10 
7 8 6 8 12 10 11 8 11 10 
...

output:

1 2 3 2 2 3 3 
3 0 3 3 3 3 1 
2 2 2 0 2 0 2 
1 3 1 1 3 2 2 
2 2 2 2 2 1 2 
2 2 1 1 2 2 2 
3 0 2 2 2 2 0 
3 3 3 3 2 3 0 
2 3 3 3 0 1 2 
2 2 2 2 2 2 2 
2 3 0 3 2 0 1 
1 3 3 1 3 3 1 
3 3 3 3 3 3 3 
3 3 3 3 0 3 3 
3 3 3 3 3 3 3 
3 3 3 0 3 3 0 
3 3 3 3 3 3 3 
3 3 0 2 0 0 2 
3 1 2 1 3 2 2 
3 2 4 2 2 2 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #80:

score: 100
Accepted
time: 0ms
memory: 4012kb

input:

300
7 1 10 9 10 12 3 11 9 10 
7 1 8 11 8 12 1 11 4 4 
7 1 11 10 10 12 11 11 11 8 
7 1 9 9 8 12 11 6 8 9 
7 10 5 12 11 9 11 9 2 10 
7 11 11 11 5 9 4 9 12 11 
7 8 5 2 11 11 1 12 11 1 
7 10 10 1 12 10 10 10 9 9 
7 7 8 10 10 12 10 10 10 10 
7 9 11 1 2 11 2 12 11 11 
7 1 10 10 10 12 10 10 10 10 
7 10 1 8...

output:

4 2 1 2 3 2 1 
3 0 2 2 3 0 3 
3 2 3 0 3 3 2 
3 0 0 1 2 1 1 
2 1 3 3 1 2 1 
3 1 3 3 3 1 4 
3 0 0 1 3 3 3 
2 2 2 1 1 2 2 
2 2 2 2 2 0 2 
3 3 1 3 3 3 3 
2 2 2 2 2 2 2 
0 2 0 2 3 3 3 
2 2 2 2 2 4 2 
2 2 2 0 3 2 2 
3 3 3 3 1 3 1 
1 2 2 2 2 1 2 
3 1 3 1 3 1 1 
0 3 3 1 3 1 3 
3 0 2 3 2 2 2 
2 0 2 0 3 3 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #81:

score: 100
Accepted
time: 2ms
memory: 4008kb

input:

300
7 8 7 12 10 8 8 8 1 2 
7 10 10 10 6 10 10 10 12 10 
7 10 3 10 10 3 12 7 10 10 
7 10 10 12 10 1 10 8 3 10 
7 10 10 12 10 9 10 10 1 3 
7 10 10 4 12 10 10 1 9 6 
7 11 11 12 11 11 11 11 2 11 
7 11 8 10 11 10 12 10 10 11 
7 12 10 9 10 10 10 8 11 3 
7 10 2 10 10 10 12 10 10 4 
7 12 11 11 11 3 9 11 11 ...

output:

0 0 0 2 0 0 0 
2 2 2 2 2 2 2 
2 1 2 2 2 2 2 
2 2 2 2 3 2 0 
2 2 2 2 1 2 2 
2 2 1 1 2 2 2 
3 3 3 3 3 3 3 
3 2 3 2 2 2 3 
2 1 2 2 2 0 3 
2 2 2 2 2 2 2 
3 3 3 1 1 3 3 
2 2 2 2 2 2 2 
3 3 1 1 3 3 3 
3 3 3 0 2 2 2 
1 1 2 2 4 2 2 
3 2 2 1 1 1 1 
1 1 3 3 3 3 3 
2 1 0 2 2 2 2 
3 3 1 0 3 3 3 
0 3 0 3 2 3 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #82:

score: 100
Accepted
time: 3ms
memory: 3712kb

input:

300
7 8 12 11 11 11 10 2 7 1 
7 11 10 12 11 8 10 11 1 11 
7 12 9 11 7 11 11 11 11 1 
7 3 12 9 11 11 9 1 11 11 
7 11 9 1 12 9 11 11 1 11 
7 11 11 12 11 11 11 11 2 11 
7 10 9 12 8 10 10 9 8 7 
7 11 9 4 12 9 9 11 9 11 
7 12 8 8 11 11 11 11 11 5 
7 10 10 10 10 10 4 12 10 9 
7 10 12 10 8 10 10 1 10 9 
7 ...

output:

3 0 3 2 3 2 4 
3 2 2 3 0 3 3 
1 3 2 3 3 3 3 
1 3 3 1 3 3 3 
1 3 3 4 3 3 1 
3 3 3 3 3 3 3 
2 1 2 0 2 2 1 
1 1 3 1 3 3 1 
0 0 3 3 3 3 3 
2 1 2 2 2 2 2 
2 2 2 2 0 2 1 
2 3 3 2 0 3 0 
1 1 3 3 3 3 3 
0 3 0 0 3 3 0 
3 3 3 2 0 3 3 
1 2 2 1 1 2 1 
3 0 3 0 3 3 3 
2 0 2 2 2 0 2 
3 3 3 3 0 4 3 
2 3 2 2 2 0 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #83:

score: 100
Accepted
time: 0ms
memory: 3716kb

input:

300
7 10 12 1 10 10 10 6 9 9 
7 8 12 11 11 10 9 2 8 11 
7 5 9 9 11 11 1 12 11 11 
7 8 12 11 10 8 8 3 9 11 
7 11 1 10 8 6 12 11 8 1 
7 6 10 6 10 10 5 12 8 10 
7 8 11 12 11 11 11 11 8 11 
7 11 8 12 11 9 9 11 5 11 
7 10 8 1 12 10 11 10 8 11 
7 10 3 10 10 10 12 10 10 10 
7 11 11 11 11 2 4 11 11 12 
7 8 ...

output:

3 2 2 2 2 1 1 
3 0 2 1 3 0 3 
3 3 1 1 1 3 3 
3 0 0 0 2 1 3 
0 2 0 3 0 2 3 
0 2 1 2 0 2 2 
0 3 3 3 3 3 3 
3 0 1 3 1 3 3 
2 3 2 0 3 2 0 
2 2 2 2 2 2 2 
3 3 3 3 3 0 3 
0 2 2 2 1 2 0 
0 0 3 0 0 2 2 
3 2 2 2 2 3 3 
2 2 2 1 2 1 2 
3 3 3 1 3 3 3 
3 3 3 3 3 3 3 
3 3 2 2 2 3 2 
3 2 1 3 3 1 3 
0 3 3 0 3 3 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #84:

score: 100
Accepted
time: 2ms
memory: 3708kb

input:

300
7 9 12 10 11 9 9 1 9 9 
7 12 11 11 11 11 11 11 11 2 
7 11 12 11 11 11 11 1 11 11 
7 12 9 9 11 11 11 11 11 1 
7 10 10 8 10 8 1 12 10 10 
7 3 11 11 4 2 11 11 12 11 
7 10 10 9 10 1 8 8 8 12 
7 8 12 8 8 8 8 2 8 11 
7 12 10 10 8 10 10 10 10 3 
7 1 10 10 8 12 7 8 3 8 
7 12 2 11 9 11 11 11 11 5 
7 1 10...

output:

2 1 1 1 3 1 1 
3 3 3 3 3 3 3 
3 3 3 3 3 3 3 
1 1 3 3 3 3 3 
2 2 2 2 0 2 0 
3 3 3 3 3 3 3 
0 0 1 2 2 0 2 
0 0 0 0 0 0 3 
2 2 0 2 2 2 2 
2 0 2 0 0 2 2 
3 3 1 3 3 3 3 
0 0 0 2 0 2 2 
2 1 2 2 1 2 3 
3 0 3 2 0 0 3 
3 3 0 3 0 1 3 
3 0 3 0 0 0 3 
3 3 2 3 4 3 1 
3 3 3 3 3 3 3 
2 0 2 0 3 2 2 
3 0 3 3 0 3 0 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #85:

score: 100
Accepted
time: 1ms
memory: 3968kb

input:

300
7 5 12 10 9 11 11 2 10 9 
7 12 1 11 11 10 9 8 1 1 
7 12 10 10 8 10 9 1 10 2 
7 4 11 11 11 12 11 11 11 11 
7 10 10 10 10 10 5 12 5 10 
7 12 11 8 11 4 11 8 11 2 
7 2 10 10 10 12 10 6 7 10 
7 10 10 10 9 9 3 12 9 3 
7 8 12 8 11 11 11 1 11 11 
7 8 8 7 11 9 2 12 8 11 
7 1 10 10 10 12 10 10 10 10 
7 8 ...

output:

2 1 3 3 1 2 1 
3 3 3 2 1 0 4 
2 2 0 2 1 1 2 
3 3 3 3 3 3 3 
2 2 2 2 2 2 2 
3 0 3 0 3 0 3 
2 2 2 2 2 2 2 
1 2 2 2 2 1 1 
0 0 3 3 3 3 3 
0 3 0 0 0 3 1 
2 2 2 2 2 2 2 
0 2 0 2 2 2 0 
2 2 2 0 2 2 3 
3 3 4 3 3 1 3 
0 2 2 2 3 3 3 
3 2 3 3 1 2 2 
3 1 2 2 1 3 1 
3 0 0 3 3 3 3 
3 3 0 0 3 3 0 
2 2 2 2 2 2 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #86:

score: 100
Accepted
time: 0ms
memory: 3968kb

input:

300
7 4 10 10 9 12 10 10 11 8 
7 10 12 10 10 10 10 4 10 10 
7 9 12 9 11 9 11 7 11 11 
7 10 12 8 10 10 10 1 3 4 
7 10 8 10 2 10 1 12 10 11 
7 9 9 10 1 9 9 11 12 11 
7 12 10 10 4 10 10 8 10 1 
7 2 7 9 10 12 11 1 10 9 
7 11 9 1 12 11 8 8 3 9 
7 11 2 10 3 11 11 11 12 8 
7 8 8 10 10 11 1 12 8 1 
7 4 10 1...

output:

2 1 3 0 2 2 2 
2 2 2 2 2 2 2 
1 1 1 3 3 3 3 
0 2 2 2 2 2 2 
2 3 2 0 2 3 2 
3 3 1 2 1 1 1 
2 2 4 2 2 0 2 
3 2 2 1 1 0 1 
3 0 0 2 1 3 1 
0 3 3 2 3 3 3 
0 0 0 0 2 2 3 
3 0 2 2 3 2 3 
3 2 3 2 3 3 1 
3 3 3 3 3 3 3 
2 2 2 2 3 1 1 
2 2 0 2 0 2 2 
3 1 3 1 3 3 3 
2 2 1 1 2 2 2 
3 1 0 3 0 2 1 
1 3 2 2 1 2 1 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #87:

score: 100
Accepted
time: 0ms
memory: 3764kb

input:

300
7 12 2 8 8 11 11 11 11 1 
7 12 11 11 11 11 11 11 11 2 
7 9 10 8 10 1 10 10 10 12 
7 12 7 8 8 8 3 8 11 3 
7 10 10 12 10 10 10 10 5 10 
7 4 8 2 8 12 11 11 3 1 
7 2 8 9 11 12 6 9 11 11 
7 10 12 8 10 10 10 1 11 10 
7 2 9 10 11 12 11 6 11 2 
7 10 9 9 7 2 9 8 9 12 
7 1 10 10 9 12 11 9 9 9 
7 10 10 1 1...

output:

3 0 0 3 3 3 3 
3 3 3 3 3 3 3 
2 2 0 1 2 2 2 
0 0 0 0 4 0 3 
2 2 2 2 2 2 2 
3 0 0 4 3 0 3 
2 3 3 3 1 0 1 
0 2 2 2 2 3 2 
3 3 3 0 2 1 2 
0 1 1 2 1 1 2 
3 1 1 1 1 2 2 
2 2 3 2 2 2 2 
3 3 3 3 3 3 3 
3 3 1 2 3 3 3 
3 2 2 2 3 1 2 
3 0 3 3 3 0 3 
3 3 3 3 3 3 0 
1 1 3 1 3 2 2 
1 3 3 1 3 3 3 
1 2 3 2 3 3 1 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #88:

score: 100
Accepted
time: 0ms
memory: 3728kb

input:

300
7 10 10 10 10 3 6 7 10 12 
7 8 10 2 12 10 8 11 10 10 
7 12 11 11 9 9 11 11 11 2 
7 2 8 11 10 12 11 11 11 2 
7 12 10 8 8 11 11 11 8 5 
7 9 11 5 12 11 11 11 8 9 
7 10 10 10 10 6 5 10 8 12 
7 12 10 10 1 9 10 2 10 4 
7 2 9 11 7 12 11 11 9 11 
7 8 9 12 10 8 10 10 4 3 
7 11 6 10 1 9 2 12 9 11 
7 4 12 ...

output:

2 2 2 2 2 2 2 
2 0 3 2 2 0 2 
3 3 1 1 3 3 3 
3 2 3 0 3 0 3 
2 0 0 3 3 3 0 
3 3 3 0 1 1 3 
2 0 2 2 2 0 2 
2 2 3 1 2 1 2 
3 2 1 3 3 1 3 
0 1 2 2 0 0 2 
1 3 3 4 2 3 1 
2 3 1 3 4 2 3 
1 1 2 2 3 1 3 
3 3 0 3 3 1 3 
1 0 0 3 1 4 3 
3 3 3 3 3 3 3 
3 3 0 3 3 3 3 
3 3 3 2 2 2 2 
3 3 3 3 3 3 3 
2 2 2 2 2 2 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #89:

score: 100
Accepted
time: 2ms
memory: 3964kb

input:

300
7 6 9 9 11 9 1 12 11 11 
7 10 2 10 9 10 12 10 9 9 
7 10 10 12 10 10 10 10 3 10 
7 8 12 11 11 11 11 6 11 8 
7 12 11 8 11 8 8 8 8 3 
7 9 10 9 1 11 9 11 12 11 
7 12 9 9 9 2 11 9 2 4 
7 4 11 11 8 12 11 11 11 1 
7 10 10 10 1 10 9 9 12 9 
7 11 10 12 10 10 11 11 8 10 
7 12 11 11 11 11 11 11 11 1 
7 10 ...

output:

3 3 1 1 1 3 1 
1 2 1 2 1 2 2 
2 2 2 2 2 2 2 
3 0 3 3 3 3 0 
3 0 3 0 0 0 0 
3 3 2 1 1 3 1 
1 1 1 3 3 1 4 
3 0 3 4 3 3 3 
1 1 2 2 2 2 1 
3 2 3 2 2 2 3 
3 3 3 3 3 3 3 
3 3 2 3 2 0 2 
3 3 1 1 3 3 3 
3 0 3 3 3 3 0 
2 2 2 2 3 2 0 
2 2 2 2 1 2 1 
2 2 2 2 2 2 2 
2 2 1 2 1 2 2 
2 1 2 2 0 2 2 
2 2 2 3 3 2 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #90:

score: 100
Accepted
time: 0ms
memory: 3716kb

input:

300
7 12 9 10 10 10 10 5 1 2 
7 10 10 10 1 8 10 8 12 4 
7 11 2 11 11 6 12 11 11 2 
7 5 9 11 11 12 11 3 11 8 
7 10 10 12 8 8 10 8 5 8 
7 4 11 11 11 12 11 8 11 11 
7 11 4 11 11 9 12 9 11 11 
7 1 9 3 10 12 11 8 10 11 
7 4 3 10 11 12 3 8 11 11 
7 10 1 10 10 10 12 10 10 9 
7 8 10 10 1 10 10 8 12 10 
7 10...

output:

1 2 2 2 2 2 1 
2 0 2 2 2 0 2 
3 2 0 3 3 3 3 
3 3 3 0 4 1 3 
2 2 2 0 0 0 0 
3 3 3 3 0 3 3 
3 1 3 1 3 3 3 
3 2 2 3 0 1 3 
3 3 3 3 0 3 2 
2 2 1 2 2 2 2 
2 0 2 2 0 2 2 
2 2 2 2 2 2 2 
2 2 2 2 2 2 2 
3 0 3 2 3 0 0 
3 3 2 2 1 3 1 
3 0 1 3 3 3 3 
2 2 2 2 1 0 2 
0 2 3 3 2 3 0 
2 3 3 3 0 3 2 
0 2 2 2 0 0 0 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #91:

score: 100
Accepted
time: 2ms
memory: 3728kb

input:

300
7 10 10 9 10 2 10 11 9 12 
7 5 11 1 8 12 4 11 8 11 
7 10 10 12 10 2 10 8 7 10 
7 10 10 10 6 10 10 10 12 10 
7 1 10 9 2 11 11 6 12 11 
7 9 9 10 1 10 10 9 12 9 
7 12 2 9 8 11 10 8 11 4 
7 10 10 12 1 3 10 8 2 8 
7 10 10 12 10 10 9 10 1 10 
7 8 9 9 11 1 8 11 10 12 
7 8 8 11 11 2 11 11 11 12 
7 8 10 ...

output:

3 1 1 2 2 2 2 
4 0 0 3 3 3 3 
2 2 2 2 3 2 0 
2 2 2 2 2 2 2 
3 2 2 1 3 3 3 
1 1 1 2 1 2 2 
3 1 0 3 2 0 3 
2 2 2 3 1 0 0 
2 2 1 2 2 2 2 
3 2 1 0 1 0 3 
3 3 3 0 0 3 3 
2 2 2 2 0 2 2 
2 4 2 2 0 2 2 
3 3 2 2 2 3 3 
2 3 2 0 3 4 3 
2 2 0 2 2 2 2 
1 1 3 3 1 3 1 
2 2 1 1 4 1 2 
2 2 3 3 2 3 2 
2 2 2 0 2 1 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #92:

score: 100
Accepted
time: 2ms
memory: 4012kb

input:

300
7 8 2 12 11 8 11 11 5 11 
7 11 11 8 12 11 11 11 11 11 
7 11 12 11 11 11 3 4 11 11 
7 12 8 11 11 11 8 11 8 4 
7 10 10 10 3 10 10 10 12 10 
7 10 10 3 12 9 10 10 10 10 
7 10 10 10 3 9 10 10 12 9 
7 1 10 10 10 12 10 10 10 10 
7 1 3 4 8 12 11 11 11 8 
7 4 10 10 11 1 10 10 10 12 
7 11 2 10 10 10 12 11...

output:

0 3 3 3 0 3 3 
3 3 3 3 3 3 3 
3 3 3 3 3 3 3 
0 3 3 3 0 3 0 
2 2 2 2 2 2 2 
1 2 2 2 2 2 2 
1 2 2 2 2 1 2 
2 2 2 2 2 2 2 
3 0 3 0 3 3 3 
2 2 2 3 2 2 3 
2 2 1 3 3 2 3 
3 1 3 3 3 3 3 
3 0 3 3 4 3 2 
2 2 2 2 1 2 2 
2 1 1 1 1 1 2 
1 1 2 2 2 2 2 
3 3 3 0 0 0 0 
2 2 2 2 2 1 2 
3 3 3 3 0 4 3 
1 3 1 3 2 1 1 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #93:

score: 100
Accepted
time: 3ms
memory: 3760kb

input:

300
7 7 1 10 10 10 12 4 10 10 
7 10 1 10 10 10 12 10 5 10 
7 12 4 10 10 10 10 10 10 1 
7 2 10 11 8 12 8 8 6 11 
7 10 9 10 5 3 10 10 10 12 
7 1 9 9 9 12 9 9 9 9 
7 9 10 10 1 10 11 10 12 9 
7 3 12 10 10 10 9 3 10 9 
7 8 5 11 8 8 12 11 11 8 
7 8 10 8 10 10 2 12 11 8 
7 10 8 11 6 1 10 8 12 11 
7 9 5 4 1...

output:

2 2 2 2 2 2 4 
2 2 2 2 2 2 2 
3 2 2 2 2 2 2 
0 0 2 3 0 2 3 
2 2 2 2 1 2 2 
1 1 1 1 1 1 1 
1 2 2 2 1 2 3 
2 3 2 1 2 2 1 
0 0 0 3 3 3 0 
3 0 0 2 0 2 2 
3 0 0 3 2 3 2 
1 3 3 1 3 1 1 
4 2 2 2 2 2 2 
1 1 2 2 2 2 2 
3 0 2 2 2 2 0 
2 2 2 3 3 2 1 
3 2 0 3 3 2 3 
2 3 0 3 3 0 3 
1 3 3 3 3 3 1 
3 1 2 2 3 2 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #94:

score: 100
Accepted
time: 2ms
memory: 3764kb

input:

300
7 10 10 1 12 10 10 10 10 10 
7 12 10 10 11 11 11 9 11 1 
7 12 10 4 8 8 8 8 8 2 
7 8 8 10 8 2 10 10 11 12 
7 10 5 1 12 10 10 10 8 6 
7 10 10 1 12 10 9 10 10 1 
7 8 5 10 8 10 1 12 11 3 
7 11 9 9 2 9 11 11 12 11 
7 10 12 10 10 10 10 3 10 10 
7 12 11 11 2 11 11 11 11 1 
7 12 10 11 11 8 10 8 9 2 
7 1...

output:

2 2 2 2 2 2 2 
2 2 3 3 3 1 3 
2 3 0 0 0 0 0 
2 3 2 0 0 2 0 
2 2 2 0 2 2 1 
2 1 2 2 0 2 2 
3 2 0 1 2 0 2 
3 3 1 1 3 1 3 
2 2 2 2 2 2 2 
3 3 3 3 3 3 3 
2 3 3 0 2 0 1 
3 3 3 2 2 1 3 
3 3 0 3 3 3 3 
3 3 3 3 2 3 0 
2 3 3 1 3 3 3 
1 1 1 1 1 3 3 
3 3 3 3 3 3 3 
2 3 2 1 2 4 3 
0 2 1 0 1 0 1 
2 0 0 2 0 2 0 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #95:

score: 100
Accepted
time: 2ms
memory: 3764kb

input:

300
7 12 10 10 10 10 8 11 10 3 
7 1 8 3 3 12 9 8 11 11 
7 11 7 4 8 5 2 12 11 11 
7 10 10 10 10 10 1 12 10 3 
7 8 11 11 11 10 3 12 8 10 
7 10 10 10 9 10 2 12 9 9 
7 10 12 10 10 7 9 2 9 10 
7 11 11 2 12 11 8 11 10 8 
7 8 7 11 11 12 8 11 11 11 
7 10 10 12 10 9 9 8 2 4 
7 8 10 8 4 8 3 12 8 8 
7 7 1 9 10...

output:

2 2 2 2 0 3 2 
1 1 3 3 0 0 3 
3 3 3 0 3 0 2 
2 2 2 2 2 2 2 
0 2 0 3 3 3 2 
1 1 2 2 2 1 2 
2 2 2 1 2 1 2 
3 0 3 2 0 3 3 
0 3 3 3 3 4 3 
2 2 1 2 1 2 0 
0 0 0 2 0 4 0 
2 2 2 2 2 1 4 
0 2 3 1 2 2 2 
0 0 0 0 3 0 0 
3 0 0 2 3 1 2 
1 1 3 1 2 1 3 
2 2 2 2 1 2 1 
3 2 0 2 3 1 2 
3 3 2 0 3 0 2 
3 2 3 2 2 2 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #96:

score: 100
Accepted
time: 0ms
memory: 3732kb

input:

300
7 10 10 1 12 10 10 10 10 10 
7 11 8 3 12 2 11 11 11 11 
7 11 11 3 12 8 11 8 11 8 
7 2 10 10 9 12 10 10 9 10 
7 10 10 8 10 3 2 12 11 10 
7 10 10 1 12 10 9 9 10 9 
7 11 11 12 11 11 11 11 1 11 
7 10 10 10 10 10 6 12 10 10 
7 10 4 10 10 9 12 8 10 11 
7 12 10 10 9 10 10 10 10 8 
7 10 10 9 11 9 8 12 1...

output:

2 2 2 2 2 2 2 
3 3 3 3 3 3 0 
0 3 0 3 0 3 3 
2 1 1 2 2 2 2 
3 2 2 2 0 2 1 
2 1 1 2 1 2 2 
3 3 3 3 3 3 3 
2 2 2 2 2 2 2 
2 1 3 0 2 2 2 
2 2 1 2 2 2 2 
3 1 2 2 1 3 1 
3 3 3 3 3 3 3 
2 2 2 2 1 2 2 
1 1 1 0 3 1 1 
2 2 3 2 2 2 2 
3 2 1 1 1 3 3 
2 2 1 2 2 2 3 
2 3 3 2 1 3 2 
3 2 2 2 1 0 3 
3 2 0 2 2 2 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #97:

score: 100
Accepted
time: 3ms
memory: 3752kb

input:

300
7 9 9 11 9 4 9 11 9 12 
7 10 12 10 10 10 10 5 10 10 
7 10 10 2 12 9 10 9 10 9 
7 11 11 4 12 11 11 11 3 11 
7 8 8 8 7 1 10 10 10 12 
7 11 12 11 11 11 11 2 4 11 
7 10 6 10 8 10 12 10 3 10 
7 12 3 10 10 9 3 5 9 1 
7 10 3 10 10 10 12 10 10 9 
7 8 10 1 11 10 1 12 10 11 
7 1 10 10 10 12 10 10 2 10 
7 ...

output:

3 1 3 1 1 1 1 
2 2 2 2 2 2 2 
1 2 1 2 1 2 2 
3 3 3 0 3 3 3 
2 2 0 0 0 2 2 
3 3 3 3 3 2 3 
0 2 2 2 0 2 2 
3 2 2 1 4 2 1 
2 2 1 2 2 2 2 
2 3 0 2 3 3 2 
2 2 0 2 2 2 2 
0 2 1 2 2 3 2 
1 1 3 3 3 1 3 
1 3 2 1 3 3 3 
3 3 3 3 3 3 2 
3 3 3 3 3 3 3 
2 0 0 2 3 3 3 
3 4 1 3 3 1 1 
3 3 3 3 3 3 3 
3 3 0 0 2 0 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #98:

score: 100
Accepted
time: 2ms
memory: 3832kb

input:

300
7 10 10 10 8 4 11 11 11 12 
7 12 11 11 11 11 11 11 11 2 
7 10 8 8 6 10 10 10 12 8 
7 10 5 10 4 9 10 10 12 10 
7 8 8 8 8 8 2 12 8 11 
7 10 10 1 10 9 2 12 11 10 
7 8 12 11 10 9 10 5 9 11 
7 10 9 10 3 11 9 2 12 11 
7 10 5 10 10 10 12 10 10 10 
7 10 11 9 2 11 9 11 12 2 
7 10 4 10 2 5 12 6 10 9 
7 10...

output:

3 3 2 2 2 3 0 
3 3 3 3 3 3 3 
0 2 0 0 2 2 2 
2 2 1 2 2 1 2 
0 3 0 0 0 0 0 
3 2 2 2 3 2 1 
3 0 1 2 2 1 3 
3 1 1 2 2 3 1 
2 2 2 2 2 2 2 
0 3 3 1 2 3 1 
3 2 1 2 2 2 2 
2 2 2 2 2 1 2 
3 2 2 1 0 2 2 
3 1 3 3 3 3 3 
2 2 0 2 3 2 2 
3 1 3 3 3 3 3 
1 3 1 3 3 3 3 
3 3 3 3 3 3 3 
3 3 3 3 3 1 3 
3 3 3 3 0 3 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #99:

score: 100
Accepted
time: 2ms
memory: 3712kb

input:

300
7 10 10 11 11 3 11 2 11 12 
7 12 11 10 11 10 10 10 11 8 
7 8 8 1 11 1 11 11 11 12 
7 8 10 12 10 8 10 6 8 11 
7 10 10 8 8 2 10 8 8 12 
7 12 10 9 10 10 10 9 10 1 
7 12 10 10 9 10 10 7 11 1 
7 11 10 3 12 10 10 8 11 9 
7 11 1 12 10 10 1 8 1 5 
7 10 5 10 10 10 12 1 2 10 
7 11 11 3 11 11 5 12 11 11 
7...

output:

1 3 3 2 2 3 3 
3 2 3 2 2 2 3 
3 3 3 0 0 3 3 
0 2 2 2 0 3 2 
0 0 0 2 2 2 0 
2 1 2 2 2 1 2 
2 2 1 2 2 2 3 
2 2 0 3 1 3 2 
3 3 3 2 2 2 0 
2 2 2 1 4 2 2 
3 3 3 3 3 3 3 
3 3 3 2 3 3 3 
1 1 2 2 0 4 2 
3 0 3 3 3 4 3 
1 2 2 2 2 2 2 
3 3 3 3 1 3 2 
3 2 2 2 2 2 2 
3 0 3 3 3 3 3 
1 1 1 1 2 1 2 
3 2 2 2 0 2 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #100:

score: 100
Accepted
time: 2ms
memory: 3928kb

input:

300
7 11 10 11 11 2 9 9 9 12 
7 10 5 9 2 10 12 2 11 4 
7 5 10 10 10 12 10 10 10 10 
7 11 1 11 11 11 12 11 11 11 
7 11 11 12 11 11 11 11 1 11 
7 12 5 10 8 10 10 10 11 8 
7 10 1 10 10 10 12 10 10 10 
7 10 9 3 12 11 9 9 9 9 
7 11 11 10 11 8 8 12 11 9 
7 1 10 10 10 12 9 10 10 10 
7 10 12 10 10 11 10 1 1...

output:

1 1 3 3 2 1 3 
3 2 2 1 3 1 2 
2 2 2 2 2 2 2 
3 3 3 3 3 3 3 
3 3 3 3 3 3 3 
3 2 0 2 2 2 3 
2 2 2 2 2 2 2 
3 1 1 1 1 2 1 
3 1 3 3 2 3 0 
1 2 2 2 2 2 2 
2 2 3 2 2 2 2 
4 3 1 3 3 1 3 
2 2 2 2 2 0 2 
1 3 2 1 1 2 3 
3 0 2 2 3 3 4 
0 2 2 2 4 1 2 
2 2 2 2 2 2 2 
2 2 2 2 2 1 4 
3 3 3 3 3 1 1 
3 3 1 1 3 3 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #101:

score: 100
Accepted
time: 2ms
memory: 3728kb

input:

300
7 8 8 8 8 5 8 11 5 12 
7 3 8 12 8 2 10 10 5 4 
7 8 10 9 10 11 2 12 8 8 
7 10 2 10 8 10 12 10 11 11 
7 8 10 11 11 1 11 11 8 12 
7 6 10 1 12 10 5 2 10 10 
7 3 9 1 12 4 11 11 9 11 
7 11 10 10 3 11 9 11 12 11 
7 9 8 9 11 11 12 1 11 11 
7 11 12 8 11 11 8 3 11 11 
7 10 12 10 9 10 10 1 10 11 
7 10 10 1...

output:

3 2 0 0 0 0 0 
3 0 2 0 3 2 2 
0 0 0 2 1 2 3 
0 2 3 2 3 2 2 
3 0 3 0 2 3 3 
2 2 4 2 2 1 2 
0 3 3 1 3 3 1 
3 3 2 2 3 3 1 
3 3 3 1 3 1 1 
0 3 3 0 3 3 3 
2 2 2 2 1 2 3 
2 2 2 2 2 2 2 
1 2 3 3 2 3 0 
3 3 3 3 3 3 3 
1 1 3 3 3 1 3 
2 3 3 3 3 0 2 
1 1 3 3 1 3 3 
3 1 1 3 3 3 3 
2 0 3 2 2 3 2 
3 3 2 2 1 3 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #102:

score: 100
Accepted
time: 2ms
memory: 3756kb

input:

300
7 5 9 9 1 1 11 9 11 12 
7 8 11 11 11 12 4 8 11 11 
7 10 1 11 11 10 12 4 2 11 
7 8 10 11 11 1 11 11 7 12 
7 11 12 11 11 11 11 1 11 11 
7 10 10 10 10 10 1 12 10 10 
7 10 12 10 8 10 9 1 10 8 
7 10 10 12 10 10 11 10 1 10 
7 10 8 8 3 9 11 11 12 11 
7 11 11 11 10 2 11 9 8 12 
7 10 9 10 10 10 6 12 5 10...

output:

1 3 1 1 1 3 3 
4 3 3 3 0 3 3 
3 2 3 2 0 3 2 
3 2 3 0 2 3 3 
3 3 3 3 3 3 3 
2 2 2 2 2 2 2 
2 2 2 1 0 2 0 
2 2 3 2 2 2 2 
3 3 0 0 2 1 3 
1 0 3 3 3 3 2 
2 2 2 1 2 2 2 
3 3 2 3 0 2 3 
2 0 0 2 2 2 2 
3 2 3 3 3 3 0 
3 3 3 3 3 3 3 
2 2 2 1 2 2 2 
3 3 2 2 1 2 2 
3 1 2 2 2 1 1 
3 2 1 2 2 3 2 
1 0 2 2 2 1 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #103:

score: 100
Accepted
time: 0ms
memory: 3712kb

input:

300
7 12 3 5 8 3 1 11 9 2 
7 9 8 12 10 10 10 11 1 9 
7 1 10 10 10 12 10 10 10 10 
7 6 7 9 10 11 12 11 11 9 
7 11 11 2 12 11 11 11 11 11 
7 3 5 12 8 11 1 11 7 11 
7 10 8 1 12 10 10 9 8 11 
7 10 10 12 8 10 10 10 4 9 
7 1 1 11 11 12 1 11 1 11 
7 12 10 10 10 10 9 9 10 1 
7 10 3 10 10 10 12 10 10 10 
7 1...

output:

3 4 0 1 3 3 1 
1 0 2 2 2 1 3 
2 2 2 2 2 2 2 
2 3 1 3 3 1 1 
3 3 3 3 3 3 3 
3 3 3 0 3 3 3 
2 2 1 0 3 2 0 
2 2 2 0 2 1 2 
3 3 4 3 3 3 3 
2 2 2 2 1 1 2 
2 2 2 2 2 2 2 
2 2 0 0 4 0 3 
2 2 2 2 2 2 2 
2 2 0 2 1 4 3 
2 2 2 3 2 3 2 
2 2 2 2 2 2 2 
3 3 0 3 0 0 3 
3 0 4 0 0 0 3 
3 3 2 3 4 2 3 
3 1 3 3 1 3 1 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #104:

score: 100
Accepted
time: 2ms
memory: 3848kb

input:

300
7 4 8 8 2 11 11 11 12 11 
7 8 11 11 4 11 2 11 12 11 
7 10 9 1 12 10 10 10 10 9 
7 8 1 5 11 11 12 8 4 11 
7 6 11 11 11 12 11 11 2 11 
7 11 10 8 11 4 2 11 11 12 
7 8 12 4 11 8 8 1 7 7 
7 10 10 12 8 8 10 8 7 11 
7 6 2 11 11 1 12 11 11 11 
7 11 11 12 11 11 11 11 2 11 
7 12 10 11 1 11 11 11 11 7 
7 1...

output:

3 3 0 0 3 3 3 
3 3 3 3 0 3 3 
2 2 2 2 1 2 1 
3 3 3 0 2 4 0 
3 3 4 3 3 3 3 
3 3 0 3 2 3 3 
3 0 0 0 3 2 2 
2 2 2 0 0 3 0 
3 3 3 3 3 3 1 
3 3 3 3 3 3 3 
2 3 3 3 3 3 3 
2 2 2 2 2 2 2 
2 2 2 2 2 2 2 
3 3 3 4 3 3 3 
2 2 2 2 2 2 2 
0 0 2 3 3 2 1 
3 1 1 2 3 3 2 
1 1 3 3 0 3 3 
3 1 3 2 2 2 2 
3 3 3 3 3 3 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #105:

score: 100
Accepted
time: 3ms
memory: 3712kb

input:

300
7 10 11 5 10 1 11 11 10 12 
7 4 5 11 11 12 11 11 11 11 
7 11 10 10 10 11 6 12 8 11 
7 12 10 10 10 3 10 8 8 6 
7 1 10 10 10 12 10 9 10 10 
7 1 9 10 3 12 10 9 9 5 
7 10 12 10 8 8 10 1 10 10 
7 10 12 10 10 8 10 2 1 10 
7 6 9 5 10 10 1 12 8 10 
7 10 10 1 12 4 10 10 10 10 
7 8 10 10 11 10 1 12 11 10 ...

output:

3 2 4 2 3 3 2 
3 3 3 3 3 1 3 
0 3 3 2 2 2 3 
2 2 2 3 2 0 0 
2 2 2 2 1 2 2 
2 1 1 2 1 1 2 
2 2 0 2 0 2 2 
2 2 0 2 2 1 2 
0 2 1 1 4 2 2 
0 2 2 2 2 2 2 
3 2 0 2 2 3 2 
0 0 0 2 2 2 2 
3 0 3 3 3 3 2 
3 1 1 3 3 3 3 
4 1 1 3 3 1 3 
2 3 1 3 2 3 3 
2 2 2 2 0 0 0 
2 2 2 2 2 3 2 
2 2 2 2 2 2 2 
3 3 3 3 3 3 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #106:

score: 100
Accepted
time: 2ms
memory: 3712kb

input:

300
7 8 10 1 2 8 8 10 12 2 
7 10 10 11 11 11 3 12 11 9 
7 10 6 2 12 3 10 1 10 9 
7 11 11 10 1 2 11 11 8 12 
7 10 1 10 8 9 12 9 8 3 
7 4 8 10 3 1 10 11 12 11 
7 10 12 10 7 10 10 1 8 11 
7 8 10 10 10 5 6 12 10 9 
7 11 3 11 11 11 12 11 11 11 
7 8 10 8 5 8 8 8 12 8 
7 8 12 10 10 8 6 1 7 3 
7 12 10 10 10...

output:

0 2 2 3 0 0 0 
3 1 2 2 3 3 3 
1 2 1 2 1 2 4 
3 0 2 3 3 3 3 
0 1 2 1 0 2 2 
3 3 0 2 3 3 2 
2 2 2 2 2 0 3 
2 1 0 2 2 2 0 
3 3 3 3 3 3 3 
0 0 2 0 0 0 0 
2 0 0 2 2 2 2 
2 2 2 0 3 3 2 
2 3 2 0 2 3 2 
2 2 2 2 2 2 2 
1 3 1 3 3 3 3 
1 2 2 2 2 2 2 
2 1 2 2 3 2 2 
2 0 3 3 3 3 3 
2 2 2 2 2 4 2 
3 4 3 3 3 2 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #107:

score: 100
Accepted
time: 2ms
memory: 3932kb

input:

300
7 10 12 11 11 10 11 2 11 1 
7 12 5 11 8 11 11 11 11 1 
7 11 12 11 11 11 11 2 11 11 
7 11 12 11 11 5 9 2 11 1 
7 11 12 11 11 8 11 1 11 11 
7 10 2 11 8 11 12 8 9 11 
7 10 8 8 5 5 1 2 12 4 
7 11 11 12 1 3 9 11 1 11 
7 10 12 3 10 10 10 1 11 10 
7 12 10 10 10 10 5 7 10 1 
7 10 10 10 1 7 10 8 12 10 
7...

output:

3 2 2 3 3 3 4 
1 3 0 3 3 3 3 
3 3 3 3 3 3 3 
3 3 2 1 3 3 4 
3 3 0 3 3 3 3 
0 3 3 0 1 3 2 
2 1 0 0 2 2 3 
3 3 1 3 1 3 3 
3 2 2 2 2 3 2 
2 2 2 2 2 2 2 
2 0 2 2 2 2 2 
1 1 3 1 3 3 1 
3 3 3 3 3 3 3 
2 2 2 2 2 2 2 
3 1 2 3 4 2 1 
3 1 1 2 2 3 1 
2 0 2 0 0 2 2 
2 2 2 2 2 2 2 
2 3 1 2 1 3 0 
1 0 3 3 3 3 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #108:

score: 100
Accepted
time: 3ms
memory: 3772kb

input:

300
7 9 2 9 11 11 12 11 11 11 
7 10 1 6 10 10 12 9 9 10 
7 3 6 11 11 11 1 12 9 11 
7 2 10 10 10 12 10 8 8 10 
7 9 9 10 9 1 9 11 10 12 
7 10 10 2 12 9 9 10 10 10 
7 10 7 10 1 10 8 10 12 10 
7 3 9 9 2 12 9 8 11 11 
7 12 9 9 8 2 4 8 8 6 
7 12 9 10 5 3 10 11 10 1 
7 2 10 10 10 12 11 11 11 1 
7 12 11 11 ...

output:

3 3 3 3 3 1 1 
2 2 2 1 1 0 2 
1 3 3 4 3 3 3 
2 2 0 2 0 2 2 
3 2 2 1 1 1 1 
1 1 2 2 2 2 2 
2 2 0 2 2 2 0 
1 3 3 3 0 1 1 
1 1 0 3 4 0 0 
1 2 2 1 2 3 2 
3 2 3 4 3 2 2 
3 3 3 3 3 3 3 
2 2 2 2 2 2 2 
3 0 3 3 3 0 3 
3 3 3 3 3 3 3 
2 0 2 2 2 2 3 
2 2 0 2 3 3 2 
2 3 1 2 2 1 1 
2 2 2 2 2 2 2 
2 2 2 2 2 2 1 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #109:

score: 100
Accepted
time: 2ms
memory: 3712kb

input:

300
7 9 9 1 12 11 11 11 11 11 
7 1 5 9 6 12 11 11 9 11 
7 10 12 10 4 11 10 4 6 10 
7 10 11 12 10 11 11 4 1 11 
7 11 12 11 8 11 11 3 11 11 
7 5 10 8 10 10 1 12 8 11 
7 10 12 11 2 7 9 1 11 11 
7 12 11 10 9 11 11 9 11 1 
7 9 7 9 9 9 12 2 11 9 
7 9 8 9 5 4 12 1 3 9 
7 11 12 11 11 9 11 1 11 11 
7 7 10 10...

output:

3 3 3 3 3 1 1 
3 2 1 3 3 1 1 
2 2 3 2 4 2 2 
2 3 3 2 3 3 2 
3 3 3 3 0 3 3 
0 3 1 2 0 2 2 
3 2 2 1 3 3 3 
3 2 1 3 3 1 3 
1 1 1 1 3 1 1 
4 1 1 1 0 1 1 
3 3 1 3 3 3 3 
0 0 2 2 4 0 3 
4 0 3 3 3 3 3 
0 3 4 2 0 3 3 
0 0 3 2 3 0 0 
1 2 2 1 1 1 1 
2 2 3 2 3 1 0 
1 1 3 0 2 2 0 
3 2 3 2 2 2 2 
2 0 2 0 2 2 0 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #110:

score: 100
Accepted
time: 2ms
memory: 3760kb

input:

300
7 10 2 10 10 10 12 8 10 10 
7 5 11 12 11 9 11 11 1 11 
7 10 10 1 12 10 10 10 10 10 
7 10 10 12 10 10 10 10 1 10 
7 6 8 11 11 9 12 11 9 11 
7 10 9 2 12 9 10 11 10 9 
7 8 8 2 12 11 8 11 10 11 
7 3 10 9 10 12 10 10 1 10 
7 11 11 5 12 11 11 11 11 11 
7 11 8 11 7 11 11 11 12 11 
7 10 10 10 10 10 1 12...

output:

2 2 2 0 2 2 2 
1 3 3 3 1 3 3 
2 2 2 2 2 2 2 
2 2 2 2 2 2 2 
3 1 3 3 1 3 1 
1 2 3 2 1 2 1 
3 0 3 2 3 0 0 
2 2 1 2 2 2 1 
3 3 3 3 3 3 3 
3 3 0 3 3 3 3 
2 2 2 2 2 2 2 
1 2 2 1 1 2 2 
1 3 1 0 3 3 3 
2 3 3 0 3 1 3 
2 2 2 2 2 0 1 
0 0 0 2 3 3 3 
3 0 2 3 3 3 3 
3 3 3 3 3 3 1 
2 1 1 2 3 1 3 
0 0 3 0 0 3 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #111:

score: 100
Accepted
time: 3ms
memory: 4016kb

input:

300
7 10 10 6 2 2 10 2 4 12 
7 11 11 4 12 11 11 11 11 11 
7 9 12 9 10 6 10 1 1 6 
7 2 9 9 9 12 1 11 11 1 
7 8 5 11 8 11 12 11 11 11 
7 9 4 9 5 10 9 9 12 11 
7 1 10 10 8 12 10 8 5 10 
7 10 10 10 1 10 11 8 12 9 
7 11 11 11 11 2 11 11 11 12 
7 11 11 9 11 1 11 11 1 12 
7 8 12 8 4 8 8 2 11 11 
7 2 10 10 ...

output:

4 2 0 2 2 2 3 
3 3 3 3 3 3 3 
1 1 2 2 2 4 2 
3 1 3 4 3 1 1 
0 3 3 3 3 3 0 
3 1 3 1 1 2 1 
2 0 2 2 0 2 2 
1 0 2 2 2 2 3 
3 3 3 3 3 3 3 
3 4 1 3 3 3 3 
0 0 0 0 4 3 3 
2 2 2 2 2 2 2 
3 2 0 1 2 2 3 
2 2 2 2 0 2 2 
2 1 0 2 1 2 1 
3 3 3 3 3 3 3 
0 0 2 2 2 0 2 
2 0 2 2 0 2 3 
2 2 0 2 2 2 2 
2 1 2 2 2 0 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #112:

score: 100
Accepted
time: 3ms
memory: 3844kb

input:

300
7 10 10 10 1 10 8 6 12 5 
7 2 10 11 3 12 11 11 10 9 
7 10 10 3 12 9 10 7 10 9 
7 2 10 10 10 12 9 2 3 10 
7 10 10 9 2 10 9 10 12 10 
7 2 10 10 8 12 8 10 10 10 
7 10 10 1 12 10 10 9 10 10 
7 12 9 11 11 9 11 11 11 2 
7 1 8 11 11 12 11 8 11 11 
7 9 12 11 3 11 10 8 11 6 
7 8 12 8 11 6 11 1 11 8 
7 11...

output:

2 2 2 2 2 2 0 
3 1 2 1 3 2 3 
1 2 2 2 1 2 2 
1 2 2 2 4 2 2 
2 2 2 1 2 2 1 
0 0 2 2 2 2 2 
2 2 1 2 2 2 2 
1 3 3 1 3 3 3 
3 3 3 3 0 0 3 
3 1 3 2 3 3 2 
0 0 2 3 3 3 0 
3 1 3 1 1 3 3 
2 4 2 2 2 2 2 
4 2 0 0 1 2 0 
3 2 2 0 2 2 0 
2 2 0 2 2 2 3 
3 3 0 3 3 3 1 
3 3 3 3 3 3 3 
2 2 2 1 2 2 1 
1 3 3 3 3 3 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #113:

score: 100
Accepted
time: 0ms
memory: 4000kb

input:

300
7 1 10 10 10 12 10 10 10 10 
7 3 9 10 11 10 1 12 9 11 
7 12 11 11 11 11 8 11 11 3 
7 10 10 1 12 10 9 10 10 8 
7 10 10 4 12 10 10 10 4 10 
7 8 12 4 8 10 10 8 8 10 
7 5 2 8 3 12 11 11 11 11 
7 11 12 11 1 9 10 3 11 4 
7 10 1 8 11 3 12 11 3 11 
7 11 11 12 11 11 11 11 7 11 
7 12 11 10 10 11 11 10 10 ...

output:

2 2 2 2 2 2 2 
1 3 3 1 2 3 2 
3 3 3 3 0 3 3 
2 1 2 2 0 2 2 
2 2 2 2 2 2 2 
3 0 2 2 0 0 2 
3 3 3 3 3 3 0 
3 3 1 2 3 3 2 
3 1 3 3 2 0 2 
3 3 3 3 3 3 3 
3 2 2 3 3 2 2 
3 1 3 1 1 1 4 
3 0 3 2 3 0 0 
1 1 1 1 1 1 3 
2 2 1 0 0 1 3 
2 2 0 2 3 1 2 
4 1 1 1 2 3 3 
2 2 2 2 2 2 2 
2 2 2 0 2 2 2 
2 1 1 2 3 4 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #114:

score: 100
Accepted
time: 0ms
memory: 3732kb

input:

300
7 10 12 10 8 10 10 3 11 10 
7 7 8 11 11 12 11 11 11 11 
7 12 11 6 11 11 11 11 11 1 
7 12 8 11 10 10 8 8 1 2 
7 8 11 12 8 8 8 11 1 11 
7 1 10 10 10 12 10 10 7 10 
7 10 7 10 9 10 12 9 9 9 
7 4 8 12 10 3 10 10 8 8 
7 1 10 9 11 12 11 10 11 11 
7 11 8 12 11 11 11 8 6 11 
7 9 10 12 6 9 9 6 3 9 
7 8 8 ...

output:

2 2 2 2 0 3 2 
3 3 3 3 3 0 3 
3 0 3 3 3 3 3 
0 3 2 2 0 0 1 
0 3 0 0 0 3 3 
2 2 2 2 2 2 2 
1 2 1 1 1 2 2 
3 0 2 2 3 0 2 
3 3 3 3 2 2 1 
3 0 3 3 3 3 0 
1 2 1 2 1 1 2 
0 2 2 0 0 3 0 
1 0 0 3 3 2 3 
0 0 3 1 3 3 3 
0 0 2 2 0 0 2 
3 2 1 2 1 3 1 
2 3 2 1 2 3 3 
2 2 2 2 2 2 2 
2 2 2 0 3 2 0 
2 2 0 0 2 0 0 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #115:

score: 100
Accepted
time: 0ms
memory: 3776kb

input:

300
7 10 5 6 10 10 12 8 9 1 
7 11 9 12 11 9 11 11 8 11 
7 12 10 10 10 10 10 10 10 5 
7 12 8 8 8 10 10 10 10 2 
7 8 6 12 8 9 9 11 2 11 
7 5 8 10 10 12 10 11 10 8 
7 4 3 8 8 12 11 11 11 11 
7 11 11 11 3 11 1 12 11 9 
7 10 10 10 5 10 10 10 12 8 
7 10 10 10 11 10 1 12 11 10 
7 3 2 10 3 10 12 10 9 11 
7 ...

output:

2 2 4 0 1 0 2 
3 1 3 3 1 3 3 
2 2 2 2 2 2 2 
0 0 0 2 2 2 2 
0 4 1 0 1 3 3 
2 2 2 0 3 0 2 
3 0 3 3 3 3 0 
3 1 3 3 3 1 3 
0 2 2 2 2 2 2 
3 2 2 2 2 3 2 
1 2 3 2 1 2 3 
3 3 1 3 0 3 3 
0 2 2 1 4 2 2 
2 1 1 2 1 1 2 
3 0 3 3 3 3 0 
2 2 4 2 0 1 3 
3 2 3 1 4 3 2 
2 3 2 2 3 2 2 
1 2 2 2 2 1 2 
3 3 1 3 2 2 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #116:

score: 100
Accepted
time: 2ms
memory: 3928kb

input:

300
7 8 10 8 10 8 8 12 10 11 
7 2 11 11 8 12 11 8 7 2 
7 1 10 10 10 12 10 10 9 10 
7 5 10 10 10 12 8 11 11 8 
7 9 9 11 11 9 4 12 11 11 
7 1 10 10 10 12 10 8 8 7 
7 11 1 10 11 7 12 9 11 1 
7 10 10 9 1 10 10 10 12 9 
7 2 11 6 8 12 11 11 11 11 
7 2 3 11 8 12 11 11 9 11 
7 9 1 11 4 11 12 8 11 11 
7 10 1...

output:

2 3 0 2 0 2 0 
3 0 2 0 0 3 3 
2 2 1 2 2 2 2 
0 2 3 0 3 2 2 
3 3 1 1 3 3 1 
2 2 0 2 0 2 2 
3 2 0 1 3 2 3 
1 2 2 1 2 2 2 
3 0 3 3 3 3 0 
3 0 1 3 3 3 3 
4 3 3 0 3 3 1 
2 2 2 2 2 2 2 
3 3 4 0 3 3 3 
1 2 2 2 3 3 3 
2 2 2 2 2 2 2 
3 0 2 2 2 3 1 
3 3 3 2 0 3 3 
3 3 3 0 0 3 2 
3 3 1 3 3 3 3 
2 2 2 1 1 3 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #117:

score: 100
Accepted
time: 2ms
memory: 3776kb

input:

300
7 9 1 10 10 9 12 10 9 5 
7 9 8 10 9 10 12 10 10 9 
7 3 10 9 11 12 8 10 10 11 
7 10 10 10 3 10 8 8 12 11 
7 2 9 5 10 12 9 10 10 10 
7 11 1 1 12 1 11 11 11 11 
7 10 10 1 12 3 10 10 9 3 
7 10 11 3 1 11 11 8 12 11 
7 9 9 8 1 8 11 10 12 11 
7 11 12 11 11 11 11 2 11 11 
7 10 2 10 10 10 12 8 10 8 
7 5 ...

output:

2 1 2 2 1 2 1 
1 2 1 2 2 2 1 
0 3 2 3 2 2 1 
3 0 2 2 2 2 0 
1 2 2 2 2 1 4 
3 3 3 3 3 3 3 
1 2 2 1 2 2 2 
3 0 3 3 2 3 3 
3 2 1 0 1 0 3 
3 3 3 3 3 3 3 
2 2 0 0 2 2 2 
0 0 0 3 3 3 0 
3 3 1 3 3 3 3 
0 3 3 3 3 3 3 
2 2 1 2 2 2 3 
2 2 2 2 2 2 2 
0 2 2 2 2 2 2 
3 1 1 1 1 2 1 
2 0 0 2 0 0 0 
0 2 3 2 1 2 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #118:

score: 100
Accepted
time: 3ms
memory: 4012kb

input:

300
7 9 2 11 8 11 12 11 11 11 
7 8 2 1 12 11 6 2 11 11 
7 9 9 9 11 1 11 11 9 12 
7 10 9 1 12 11 11 11 9 11 
7 8 11 11 3 11 11 11 12 11 
7 11 12 11 8 11 11 2 11 11 
7 11 12 8 11 11 11 2 11 11 
7 2 10 11 5 12 10 10 9 10 
7 10 1 10 10 10 12 10 10 10 
7 10 10 10 7 4 6 12 11 9 
7 1 9 9 9 12 9 9 9 3 
7 10...

output:

0 3 3 3 3 3 1 
3 2 4 3 3 0 3 
3 1 1 1 1 3 3 
3 3 3 1 3 2 1 
3 3 3 3 0 3 3 
3 3 3 3 0 3 3 
0 3 3 3 3 3 3 
2 2 1 2 2 2 3 
2 2 2 2 2 2 2 
3 1 2 2 2 2 1 
1 1 1 2 1 1 1 
2 2 3 0 0 4 3 
3 3 0 3 0 3 0 
2 0 0 2 2 2 2 
2 2 2 2 1 2 1 
3 0 3 1 3 1 3 
2 1 1 2 1 1 2 
3 3 3 3 3 3 3 
2 4 2 3 3 3 2 
0 3 1 3 3 0 0 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #119:

score: 100
Accepted
time: 2ms
memory: 3716kb

input:

300
7 10 9 1 12 10 1 11 11 9 
7 6 11 11 8 12 9 11 11 11 
7 10 1 10 10 10 12 8 10 10 
7 10 10 12 10 9 10 11 1 9 
7 8 10 8 4 11 3 12 10 10 
7 10 8 10 4 6 10 10 12 10 
7 11 11 12 11 8 11 11 3 11 
7 8 8 6 12 10 10 8 11 10 
7 10 10 1 12 10 10 8 8 10 
7 8 11 11 11 3 11 11 8 12 
7 11 11 12 11 11 11 11 2 11...

output:

2 3 3 3 1 2 1 
1 0 3 3 3 3 3 
2 2 2 0 2 2 2 
2 2 2 2 1 1 3 
2 2 0 2 0 4 3 
2 2 0 2 2 2 2 
3 3 3 3 0 3 3 
2 2 0 3 2 0 0 
2 2 0 0 2 2 2 
3 0 3 0 3 3 3 
3 3 3 3 3 3 3 
0 2 2 2 0 2 0 
2 2 2 2 2 2 2 
4 2 3 3 2 3 0 
2 2 2 0 2 2 2 
0 2 2 3 0 2 0 
1 2 0 0 1 2 1 
1 0 3 3 3 3 1 
2 2 2 2 2 2 1 
0 2 3 4 0 0 0 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #120:

score: 100
Accepted
time: 1ms
memory: 4012kb

input:

300
7 12 10 11 10 11 11 10 10 1 
7 11 12 11 11 2 11 1 11 10 
7 11 10 1 12 10 10 10 10 10 
7 10 10 11 1 10 11 11 12 10 
7 11 10 10 10 4 8 10 10 12 
7 11 2 11 11 10 12 10 11 11 
7 10 7 10 4 3 6 10 12 10 
7 11 10 10 1 11 11 11 12 9 
7 11 11 1 12 11 11 11 11 11 
7 10 10 10 10 10 6 12 10 10 
7 11 11 12 1...

output:

2 3 2 3 3 2 2 
3 3 3 3 3 3 2 
2 2 2 2 2 3 2 
2 3 2 3 2 2 3 
2 2 2 3 2 0 2 
3 2 3 2 3 3 3 
2 2 0 2 2 3 2 
1 3 2 2 3 3 3 
3 3 3 3 3 3 3 
2 2 2 2 2 2 2 
3 3 1 3 3 0 3 
2 2 3 1 2 2 2 
2 0 2 2 2 2 2 
0 3 3 2 3 3 3 
0 2 3 2 3 3 3 
2 3 1 2 2 2 2 
1 2 2 3 2 2 1 
3 3 3 1 3 3 3 
3 2 3 1 3 3 2 
3 0 2 3 3 0 0 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #121:

score: 100
Accepted
time: 3ms
memory: 4008kb

input:

300
7 11 10 12 11 11 10 8 3 8 
7 10 10 10 10 7 10 10 8 12 
7 10 9 10 9 1 9 5 9 12 
7 1 11 10 10 12 11 11 10 11 
7 11 10 10 11 1 3 10 11 12 
7 10 10 9 1 10 10 10 12 9 
7 11 11 2 12 11 11 11 11 11 
7 7 10 8 12 10 10 10 10 11 
7 11 11 11 10 11 1 12 11 10 
7 10 11 11 8 11 1 12 11 11 
7 10 8 2 1 10 10 8 ...

output:

3 2 2 3 3 0 0 
2 0 2 2 2 2 2 
2 1 2 2 1 1 1 
3 2 2 3 3 3 2 
2 3 2 3 2 4 3 
1 2 2 1 2 2 2 
3 3 3 3 3 3 3 
2 2 2 2 3 1 2 
3 2 3 3 3 2 3 
3 3 2 3 3 0 3 
0 0 0 3 2 2 2 
1 3 2 3 2 2 3 
2 3 2 2 3 2 3 
3 3 3 2 3 1 4 
3 2 2 3 2 2 2 
1 2 2 1 1 1 2 
2 2 2 2 1 2 3 
2 2 2 2 2 2 2 
3 0 3 3 2 3 3 
2 2 2 3 2 2 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #122:

score: 100
Accepted
time: 3ms
memory: 3732kb

input:

300
7 10 10 10 5 8 10 10 12 1 
7 3 11 10 10 12 10 10 10 10 
7 10 12 10 11 10 10 5 10 11 
7 11 8 8 11 11 5 12 11 11 
7 9 10 1 12 9 10 11 10 10 
7 11 12 11 11 11 10 2 8 11 
7 12 11 11 11 11 9 11 11 2 
7 6 10 11 11 4 11 10 10 12 
7 1 11 11 10 12 11 11 11 11 
7 11 8 10 11 11 12 11 11 10 
7 10 3 11 11 11...

output:

4 2 2 2 2 0 2 
2 2 2 2 2 3 2 
2 2 2 2 3 2 3 
3 3 3 0 0 3 3 
1 2 3 2 2 1 2 
3 3 3 2 3 0 3 
3 3 3 3 1 3 3 
2 2 3 1 2 3 3 
3 2 3 3 3 3 3 
3 3 2 3 3 2 3 
3 3 3 3 3 3 2 
3 2 2 2 2 2 3 
1 1 3 3 3 3 3 
3 2 3 3 1 2 2 
2 2 0 3 1 3 2 
2 2 1 3 3 2 2 
2 2 2 3 2 3 1 
2 3 2 2 3 2 2 
3 3 3 3 3 3 3 
2 2 3 2 2 0 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #123:

score: 100
Accepted
time: 0ms
memory: 4004kb

input:

300
7 12 10 10 10 4 10 10 11 2 
7 10 5 10 10 11 12 11 11 11 
7 10 10 1 12 8 8 8 10 10 
7 11 11 4 12 11 10 11 10 11 
7 11 11 11 3 11 11 11 12 11 
7 10 11 11 6 11 10 10 12 10 
7 11 11 11 3 11 11 11 12 11 
7 11 12 10 11 10 4 5 10 11 
7 11 10 4 12 10 11 10 11 11 
7 12 11 11 11 11 10 11 11 2 
7 11 12 11 ...

output:

2 2 2 0 2 2 3 
2 3 3 3 3 2 2 
0 0 0 2 2 2 2 
3 2 3 2 3 3 3 
3 3 3 3 3 3 3 
2 2 3 3 2 3 2 
3 3 3 3 3 3 3 
2 3 2 4 3 2 3 
2 3 2 3 3 3 2 
3 3 3 3 2 3 3 
3 3 2 2 2 3 2 
3 3 2 2 3 2 2 
3 2 3 3 3 3 3 
3 3 3 3 3 3 3 
3 3 3 3 3 1 1 
2 2 2 2 2 2 3 
2 2 3 2 3 0 3 
0 1 3 3 3 3 3 
3 0 3 3 3 3 0 
2 3 3 2 3 3 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #124:

score: 100
Accepted
time: 2ms
memory: 3844kb

input:

300
7 12 11 10 1 11 10 10 10 1 
7 6 10 11 10 12 10 10 11 10 
7 1 10 10 10 12 10 10 10 11 
7 10 10 10 6 10 10 11 12 10 
7 12 10 11 11 11 11 11 11 6 
7 10 10 1 12 11 10 10 10 10 
7 12 10 10 10 10 10 10 10 6 
7 11 11 10 1 11 10 7 12 11 
7 2 11 11 10 12 11 11 11 10 
7 10 10 10 10 10 1 12 10 10 
7 11 11 ...

output:

3 2 3 3 2 2 2 
2 2 3 2 2 2 3 
2 2 2 3 2 2 2 
2 3 2 2 2 2 2 
2 3 3 3 3 3 3 
3 2 2 2 2 2 2 
2 2 2 2 2 2 2 
3 2 3 2 3 3 2 
3 2 3 2 3 3 3 
2 2 2 2 2 2 2 
3 2 2 3 3 3 2 
3 3 1 2 3 2 2 
0 2 2 2 2 2 3 
3 3 3 2 3 2 3 
3 3 2 2 4 3 2 
3 2 0 2 3 3 2 
3 3 3 2 0 3 3 
3 2 2 2 2 2 3 
2 2 2 2 2 2 2 
3 3 2 3 3 3 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #125:

score: 100
Accepted
time: 2ms
memory: 3704kb

input:

300
7 12 11 10 11 10 10 8 10 4 
7 11 12 11 11 4 11 2 11 11 
7 11 8 11 10 11 12 11 11 10 
7 12 10 8 8 8 8 1 10 1 
7 10 10 12 10 10 10 10 3 10 
7 11 12 11 11 4 11 1 11 11 
7 5 10 11 11 12 11 10 10 11 
7 12 11 2 11 11 11 11 11 3 
7 8 11 11 11 12 11 11 11 11 
7 10 10 10 3 8 10 8 12 9 
7 10 12 11 11 11 1...

output:

3 2 3 2 2 0 2 
3 3 0 3 3 3 3 
2 3 2 3 3 3 3 
2 0 0 0 0 1 2 
2 2 2 2 2 2 2 
3 3 0 3 3 3 3 
3 3 2 3 2 2 3 
3 3 3 3 3 3 3 
3 3 3 3 3 3 3 
1 0 2 2 2 0 2 
3 2 3 3 3 3 1 
2 2 1 2 2 1 2 
1 3 3 1 3 2 3 
2 2 2 2 2 2 2 
2 2 2 0 2 2 2 
3 3 3 3 3 3 3 
2 2 3 2 2 2 2 
2 2 2 2 2 1 2 
2 1 2 2 2 3 2 
3 2 3 1 2 3 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #126:

score: 100
Accepted
time: 1ms
memory: 4012kb

input:

300
7 12 10 10 10 10 10 10 10 6 
7 10 10 2 3 10 10 10 12 10 
7 10 11 6 11 1 10 10 10 12 
7 10 11 12 11 10 10 1 2 11 
7 10 10 4 12 10 10 8 10 10 
7 11 2 11 11 10 12 11 11 10 
7 2 10 11 10 12 11 10 9 11 
7 10 11 1 12 10 10 10 10 10 
7 10 11 12 7 10 10 9 2 10 
7 10 11 10 10 10 1 12 11 10 
7 10 12 10 8 ...

output:

2 2 2 2 2 2 2 
2 2 2 3 2 2 2 
2 2 0 2 3 2 3 
2 3 2 3 2 3 1 
2 2 0 2 2 2 2 
3 2 2 3 3 3 3 
3 2 1 3 2 2 3 
2 2 2 2 2 2 3 
2 3 2 2 2 2 1 
3 2 2 3 2 2 2 
2 2 2 2 0 2 2 
3 3 0 2 2 2 0 
3 2 3 2 3 2 3 
0 0 3 1 0 3 2 
3 3 3 3 3 3 2 
3 1 2 0 3 2 3 
3 3 3 3 3 3 3 
3 3 3 3 3 3 1 
3 3 3 3 3 3 3 
2 3 3 3 3 3 1 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #127:

score: 100
Accepted
time: 2ms
memory: 4016kb

input:

300
7 3 10 11 10 12 11 10 11 11 
7 10 12 10 11 10 10 8 9 10 
7 12 10 9 10 8 4 10 11 1 
7 11 12 11 11 11 11 1 11 11 
7 4 11 11 11 12 11 11 11 11 
7 11 11 12 10 10 11 11 1 11 
7 8 8 8 8 8 1 12 11 11 
7 11 9 2 12 11 9 1 11 11 
7 11 11 2 12 11 10 8 11 11 
7 10 5 10 11 10 12 11 11 11 
7 11 11 12 1 11 11 ...

output:

3 2 3 3 2 2 3 
2 2 2 2 3 1 2 
2 1 2 0 0 2 3 
3 3 3 3 3 3 3 
3 3 3 3 3 3 3 
3 3 3 2 2 3 3 
3 3 0 0 0 0 0 
3 1 1 3 3 3 1 
3 2 0 3 3 3 3 
3 2 3 3 3 2 2 
3 3 3 3 3 2 3 
3 2 3 2 3 2 3 
2 2 3 1 2 3 3 
3 3 3 2 3 2 3 
3 3 3 1 3 3 3 
3 3 3 3 3 3 3 
3 3 3 0 3 3 2 
0 1 1 0 1 1 4 
2 2 2 2 2 2 2 
2 2 2 2 2 2 1 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #128:

score: 100
Accepted
time: 2ms
memory: 3772kb

input:

300
7 5 11 11 11 12 11 11 9 11 
7 12 10 10 10 10 10 10 11 3 
7 10 10 10 10 10 4 12 10 10 
7 10 12 10 10 11 10 6 10 11 
7 10 10 10 3 10 10 9 12 9 
7 12 6 9 11 11 9 10 10 1 
7 10 12 9 10 10 11 1 10 10 
7 6 10 10 1 9 10 10 12 10 
7 10 10 12 10 10 10 10 3 10 
7 1 10 10 10 12 10 10 10 10 
7 11 11 12 11 1...

output:

3 3 1 3 3 3 3 
2 2 2 2 2 2 3 
2 2 2 2 2 2 2 
2 2 3 2 2 2 3 
1 1 2 2 2 2 2 
4 1 3 3 1 2 2 
1 2 2 3 2 2 2 
2 2 2 2 1 1 2 
2 2 2 2 2 2 2 
2 2 2 2 2 2 2 
3 3 3 3 3 3 3 
0 3 2 3 3 3 3 
0 3 1 2 2 2 2 
3 2 2 3 3 3 4 
2 2 2 2 2 2 1 
0 0 2 2 2 0 1 
3 3 3 3 3 3 3 
3 3 3 3 2 3 3 
1 3 2 3 2 3 3 
2 2 2 1 0 2 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #129:

score: 100
Accepted
time: 3ms
memory: 3772kb

input:

300
7 7 8 8 11 12 8 8 3 5 
7 10 10 3 12 10 10 10 10 10 
7 10 9 10 10 9 1 12 9 10 
7 12 9 4 10 10 10 10 10 3 
7 10 12 11 3 10 11 1 10 10 
7 6 11 5 12 11 10 11 11 11 
7 10 3 10 10 10 12 10 9 9 
7 10 10 3 12 10 10 7 10 10 
7 11 5 10 11 1 12 11 11 10 
7 10 10 5 11 10 2 12 9 11 
7 12 11 10 10 10 10 11 10...

output:

0 3 0 2 0 0 0 
2 2 2 2 2 2 2 
1 2 2 1 2 2 1 
1 3 2 2 2 2 2 
3 2 2 3 1 2 2 
3 2 3 3 3 1 3 
2 2 1 2 1 2 2 
2 2 2 2 2 2 2 
3 3 2 3 3 2 3 
1 3 2 2 4 3 2 
3 2 2 2 2 3 2 
3 3 3 3 3 3 3 
3 3 3 1 3 2 2 
2 2 3 0 2 3 3 
2 3 2 3 2 2 2 
3 3 3 3 3 3 3 
1 0 3 2 2 2 2 
3 3 3 2 3 3 2 
3 3 1 3 3 3 3 
3 3 2 0 2 0 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #130:

score: 100
Accepted
time: 0ms
memory: 3712kb

input:

300
7 1 3 10 10 12 11 11 10 11 
7 9 4 11 10 10 12 10 11 11 
7 11 11 1 12 10 10 11 7 10 
7 11 1 10 11 10 12 11 10 10 
7 10 12 10 10 10 10 1 10 10 
7 10 5 9 6 8 9 11 12 11 
7 9 12 10 10 11 11 6 11 10 
7 8 10 12 10 11 10 10 1 11 
7 8 12 10 10 10 10 4 10 10 
7 11 11 10 11 11 1 12 10 11 
7 11 10 1 12 3 1...

output:

3 2 2 3 3 3 2 
2 2 3 2 3 3 1 
2 2 3 2 2 3 3 
3 2 2 3 2 2 3 
2 2 2 2 2 2 2 
3 3 3 1 2 0 1 
2 1 3 3 2 3 2 
0 2 2 2 3 3 2 
2 0 2 2 2 2 2 
2 3 3 3 2 3 3 
1 3 3 3 3 3 2 
3 3 3 2 3 3 3 
3 3 3 2 3 3 3 
2 2 3 0 2 2 2 
3 3 2 3 0 1 2 
3 0 3 3 3 3 3 
3 2 2 2 2 2 2 
1 3 3 0 3 3 3 
1 2 3 2 2 1 2 
2 3 3 3 3 3 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #131:

score: 100
Accepted
time: 0ms
memory: 3776kb

input:

300
7 11 10 10 1 11 9 9 12 11 
7 10 10 10 9 3 10 9 9 12 
7 8 8 3 12 8 10 11 9 11 
7 11 7 7 4 11 1 12 11 11 
7 1 11 9 11 12 11 11 11 11 
7 11 10 9 5 10 11 10 12 11 
7 11 11 2 12 10 11 11 11 11 
7 1 11 11 11 12 11 11 11 11 
7 11 1 11 11 11 12 11 11 11 
7 10 10 10 3 10 10 6 12 10 
7 11 10 9 11 11 6 12 ...

output:

3 1 2 2 3 3 1 
1 1 2 2 2 2 1 
0 2 3 1 3 0 0 
3 3 3 0 0 4 3 
3 3 3 3 3 3 1 
3 2 2 1 3 2 3 
2 3 3 3 3 3 3 
3 3 3 3 3 3 3 
3 3 3 3 3 3 3 
2 2 2 2 2 2 2 
3 3 3 2 1 3 3 
2 2 2 2 2 0 2 
2 3 3 3 2 3 2 
2 2 2 2 1 2 2 
3 3 3 3 3 4 3 
2 2 2 2 3 2 2 
3 3 3 3 3 0 3 
0 2 2 2 2 2 2 
3 2 2 3 0 2 3 
3 3 3 2 0 3 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #132:

score: 100
Accepted
time: 0ms
memory: 4008kb

input:

300
7 10 11 10 10 10 8 12 10 11 
7 10 12 10 10 10 10 3 9 11 
7 11 9 11 11 3 1 12 11 11 
7 10 10 11 10 5 11 11 10 12 
7 11 10 8 3 8 11 11 12 11 
7 11 11 12 8 11 11 11 2 11 
7 12 6 11 11 11 11 11 8 2 
7 12 11 11 11 7 7 4 11 1 
7 10 11 10 11 5 10 10 10 12 
7 11 11 1 12 11 11 11 11 11 
7 11 11 12 10 10 ...

output:

2 3 2 3 2 2 2 
2 2 2 2 2 1 3 
3 3 3 1 3 3 1 
3 2 3 2 2 3 2 
3 3 2 0 3 0 3 
3 3 3 0 3 3 3 
4 3 3 3 3 3 0 
3 3 3 2 2 2 3 
2 2 2 2 3 2 3 
3 3 3 3 3 3 3 
3 3 3 2 2 1 2 
1 2 2 2 2 2 2 
1 1 2 3 2 2 2 
4 2 3 3 3 3 2 
3 3 3 3 3 3 3 
2 1 2 0 0 2 2 
2 2 2 0 2 2 2 
0 1 2 2 2 2 2 
2 2 2 3 3 3 2 
1 1 0 0 0 1 1 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #133:

score: 100
Accepted
time: 2ms
memory: 3772kb

input:

300
7 11 5 11 8 10 12 7 11 11 
7 10 10 12 10 11 10 10 4 10 
7 10 11 8 12 11 5 10 11 11 
7 12 10 10 10 11 10 10 10 3 
7 12 11 10 10 11 11 10 11 1 
7 11 11 4 12 11 10 11 11 11 
7 10 10 12 10 10 10 10 3 10 
7 11 3 10 11 11 12 8 11 11 
7 11 11 12 11 8 10 11 5 10 
7 4 12 9 9 11 5 1 1 11 
7 10 10 10 10 10...

output:

0 2 3 2 3 3 3 
2 2 2 2 3 2 2 
3 0 2 3 3 2 3 
2 2 2 3 2 2 2 
3 2 2 3 3 2 3 
3 2 3 3 3 3 3 
2 2 2 2 2 2 2 
3 3 3 0 3 2 3 
3 3 2 3 0 2 3 
1 3 3 2 1 4 3 
2 2 2 2 2 2 2 
1 2 2 2 2 2 2 
2 2 2 2 2 2 2 
0 2 1 0 4 2 2 
2 3 3 2 2 1 3 
2 2 2 2 0 2 2 
1 2 3 2 2 3 2 
1 3 2 0 2 3 1 
1 1 1 2 1 1 1 
3 3 1 3 2 2 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #134:

score: 100
Accepted
time: 2ms
memory: 3724kb

input:

300
7 10 10 10 10 10 1 12 10 10 
7 11 12 11 11 11 11 5 11 11 
7 11 11 11 6 11 10 11 12 11 
7 10 12 11 11 9 11 1 10 11 
7 11 11 11 11 11 1 12 11 11 
7 10 10 10 2 10 10 10 12 10 
7 11 8 4 12 11 9 11 9 9 
7 11 10 12 10 11 11 11 1 11 
7 9 10 1 12 10 8 11 10 10 
7 10 11 7 10 3 8 8 11 12 
7 8 10 8 8 1 8 8...

output:

2 2 2 2 2 2 2 
3 3 3 3 3 3 3 
3 3 3 3 3 3 2 
3 2 1 3 3 2 3 
3 3 3 3 3 3 3 
2 2 2 2 2 2 2 
3 1 3 1 1 3 0 
3 2 3 2 3 3 3 
2 0 3 2 2 1 2 
0 3 0 2 3 0 2 
0 3 0 0 2 0 0 
3 3 2 3 0 1 2 
2 2 3 2 2 2 2 
3 2 2 3 2 2 2 
3 2 2 3 3 2 3 
2 3 2 2 0 3 2 
2 2 3 3 0 3 3 
2 2 2 3 3 3 2 
3 3 2 3 3 2 3 
1 1 1 2 2 0 1 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #135:

score: 100
Accepted
time: 0ms
memory: 3732kb

input:

300
7 10 10 10 1 10 8 8 12 8 
7 11 9 11 1 10 11 11 12 11 
7 11 9 1 12 2 11 11 11 11 
7 10 11 11 10 11 1 12 11 11 
7 8 11 2 12 11 11 11 11 10 
7 11 5 10 10 10 12 11 10 4 
7 10 10 10 10 5 10 4 9 12 
7 10 4 10 10 10 12 10 2 10 
7 8 10 8 10 4 11 8 11 12 
7 12 10 10 11 9 10 11 10 1 
7 10 12 10 4 10 10 1 ...

output:

0 0 2 2 2 2 0 
3 3 1 3 3 2 3 
3 3 3 3 3 3 1 
3 3 2 3 3 2 3 
3 3 3 3 2 0 3 
2 2 2 3 2 2 3 
2 1 2 2 2 2 2 
2 2 2 2 4 2 2 
0 3 0 0 2 3 2 
2 2 3 1 2 3 2 
2 2 2 2 4 3 2 
3 3 3 1 1 2 3 
3 3 3 3 3 1 2 
2 3 3 2 3 2 2 
3 2 3 2 0 2 3 
3 3 3 3 2 3 3 
2 2 0 0 2 2 0 
2 3 3 1 2 3 2 
2 2 2 2 2 2 2 
2 2 2 2 2 2 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #136:

score: 100
Accepted
time: 3ms
memory: 4012kb

input:

300
7 10 7 12 10 11 10 11 4 11 
7 11 11 1 12 11 11 11 11 9 
7 12 10 10 10 8 10 11 10 1 
7 9 11 12 4 11 11 11 2 11 
7 9 12 11 10 10 10 1 11 10 
7 10 5 10 10 9 12 10 10 10 
7 5 10 10 8 12 2 10 10 11 
7 11 11 10 1 10 11 10 12 11 
7 6 10 11 9 12 11 11 11 11 
7 10 10 9 10 6 9 9 10 12 
7 11 11 11 1 11 11 ...

output:

2 0 2 2 3 3 3 
3 3 3 3 1 3 3 
2 2 2 0 2 3 2 
1 3 3 4 3 3 3 
3 1 2 2 2 3 2 
2 1 2 2 2 2 2 
3 0 2 3 2 2 2 
3 2 3 2 3 2 3 
3 1 3 3 3 2 3 
1 2 1 2 2 1 2 
3 3 3 3 3 3 3 
4 2 2 2 3 3 3 
1 1 2 2 1 1 4 
3 2 2 3 2 2 2 
2 3 2 2 2 3 3 
2 2 2 2 2 2 2 
2 2 2 2 2 2 2 
0 3 3 3 3 3 0 
2 3 2 2 3 2 3 
2 0 3 3 3 2 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #137:

score: 100
Accepted
time: 3ms
memory: 3760kb

input:

300
7 11 1 11 11 11 12 11 11 11 
7 12 11 10 10 10 9 3 10 6 
7 9 8 8 3 11 9 11 12 11 
7 11 10 12 11 11 11 11 2 11 
7 11 10 11 1 10 11 7 12 11 
7 11 11 12 11 10 11 11 2 4 
7 12 11 11 11 8 11 10 10 3 
7 11 11 4 12 9 10 10 10 11 
7 11 10 12 11 10 11 10 4 10 
7 10 11 4 12 10 11 10 11 10 
7 10 3 10 10 10 ...

output:

3 3 3 3 3 3 3 
3 2 2 2 1 4 2 
3 3 0 0 1 3 1 
3 2 3 3 3 3 3 
3 2 2 3 3 2 3 
3 3 3 3 2 2 3 
3 3 3 0 3 2 2 
1 2 2 2 3 3 3 
3 2 3 3 2 2 2 
2 3 2 3 2 2 3 
2 2 1 2 3 2 2 
2 0 3 2 3 2 2 
3 2 3 2 3 2 3 
2 2 2 2 3 3 3 
2 2 2 2 2 2 3 
2 2 2 2 2 2 4 
1 1 2 2 2 1 1 
3 2 3 2 3 3 2 
0 3 0 0 0 0 0 
2 3 3 3 3 3 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #138:

score: 100
Accepted
time: 0ms
memory: 3732kb

input:

300
7 1 11 11 11 12 11 11 11 9 
7 11 1 11 11 11 12 6 11 11 
7 12 10 10 8 11 11 11 11 8 
7 4 11 11 11 2 11 11 11 12 
7 2 10 9 11 12 1 10 8 10 
7 1 4 12 8 9 11 11 1 1 
7 8 8 8 12 3 11 11 11 11 
7 11 10 1 12 10 10 11 10 11 
7 11 4 10 10 10 12 10 10 10 
7 10 12 11 8 10 10 1 11 10 
7 8 11 2 12 8 11 11 11...

output:

3 3 3 1 3 3 3 
3 3 3 2 3 3 3 
2 2 0 3 3 3 3 
3 3 3 3 3 3 3 
3 3 0 2 2 2 1 
3 3 3 0 1 0 3 
3 3 3 3 3 0 0 
2 2 3 2 3 3 2 
2 2 2 2 2 2 3 
3 2 2 2 0 3 2 
0 3 3 3 0 0 3 
2 3 3 2 2 3 3 
0 2 2 2 2 0 2 
3 2 3 2 2 1 2 
2 2 2 2 2 2 2 
2 2 3 3 3 3 3 
3 3 3 3 3 3 3 
2 0 2 2 3 0 0 
2 2 2 2 2 2 2 
3 1 4 2 3 3 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #139:

score: 100
Accepted
time: 3ms
memory: 3712kb

input:

300
7 12 11 10 11 11 11 11 11 2 
7 10 10 3 12 11 11 10 11 1 
7 10 10 1 12 9 11 10 9 11 
7 12 9 11 11 10 10 11 11 1 
7 8 10 11 1 10 10 11 12 10 
7 10 10 6 12 10 10 10 9 10 
7 11 11 11 11 8 5 12 11 11 
7 11 10 11 5 11 11 11 12 11 
7 10 7 11 11 7 12 11 11 11 
7 5 11 7 10 12 10 11 11 10 
7 8 9 9 1 11 9 ...

output:

3 2 3 3 3 3 3 
3 3 2 3 4 2 2 
1 3 2 1 3 2 2 
1 3 3 2 2 3 3 
2 3 2 3 0 2 2 
2 2 2 1 2 2 2 
3 3 3 3 3 3 0 
3 3 2 3 3 3 3 
3 2 3 3 3 3 2 
2 2 3 2 3 3 0 
1 3 1 1 0 3 1 
2 3 2 1 3 1 2 
2 0 3 2 2 2 2 
2 3 2 1 0 2 1 
1 2 2 2 2 2 2 
3 1 2 2 3 1 3 
2 2 1 1 1 2 2 
1 1 3 3 3 2 2 
3 2 2 2 0 0 2 
2 2 2 2 2 2 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #140:

score: 100
Accepted
time: 2ms
memory: 3712kb

input:

300
7 11 1 11 4 3 12 8 11 11 
7 8 12 11 10 11 11 1 11 11 
7 10 1 9 10 10 12 10 11 10 
7 1 11 8 1 8 11 11 12 11 
7 6 11 11 11 12 11 11 11 10 
7 12 9 11 10 11 11 10 11 1 
7 11 12 10 11 11 10 5 11 11 
7 12 11 11 11 11 11 11 11 1 
7 10 11 10 10 8 2 12 8 6 
7 10 10 1 12 10 10 8 6 10 
7 11 10 10 1 10 5 12...

output:

4 1 3 0 3 3 3 
3 0 3 3 2 3 3 
2 2 2 2 3 1 2 
3 3 3 0 3 0 3 
3 3 3 2 3 3 3 
1 3 2 3 3 2 3 
2 3 3 2 3 3 3 
3 3 3 3 3 3 3 
0 2 2 3 2 2 0 
2 2 0 2 2 2 2 
2 2 3 2 2 3 2 
3 3 3 3 2 3 3 
0 4 3 0 0 3 0 
1 0 3 2 2 2 2 
2 2 2 2 2 3 2 
2 0 2 3 3 3 3 
3 2 3 2 3 2 2 
2 2 3 3 2 3 3 
3 3 2 2 3 3 3 
3 2 2 3 2 2 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #141:

score: 100
Accepted
time: 3ms
memory: 3708kb

input:

300
7 9 3 9 11 11 12 10 11 11 
7 6 11 10 11 12 10 10 11 11 
7 10 10 8 8 8 1 12 8 4 
7 12 8 10 10 9 1 10 11 6 
7 6 10 10 10 12 10 10 10 10 
7 12 11 11 11 11 11 3 11 1 
7 10 10 2 12 10 10 10 10 10 
7 10 3 10 10 9 12 9 9 9 
7 11 6 8 12 11 11 11 11 10 
7 11 1 11 11 11 12 11 11 11 
7 10 11 11 11 5 11 4 1...

output:

3 3 3 2 3 1 1 
2 3 3 3 2 3 2 
0 2 2 2 0 0 0 
0 2 2 1 3 2 3 
2 2 2 2 2 2 2 
3 3 3 3 3 2 3 
2 2 2 2 2 2 2 
2 1 1 1 1 2 2 
3 3 3 3 2 3 1 
3 3 3 3 3 3 3 
2 3 3 2 3 3 3 
3 2 2 3 2 3 3 
3 1 1 3 2 1 3 
2 2 2 2 3 2 2 
2 2 2 2 3 2 2 
2 3 2 3 3 1 2 
3 3 3 4 3 3 3 
2 2 3 2 3 3 2 
4 1 3 2 3 3 3 
2 2 3 2 2 3 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #142:

score: 100
Accepted
time: 3ms
memory: 3732kb

input:

300
7 3 10 10 8 12 11 8 10 11 
7 10 10 12 10 11 10 10 1 10 
7 10 10 1 12 10 10 10 11 10 
7 10 3 10 10 11 12 10 10 10 
7 10 8 10 10 10 12 9 10 10 
7 10 10 10 3 8 10 8 12 8 
7 11 11 11 2 11 11 11 12 11 
7 11 9 5 12 11 11 10 11 11 
7 12 10 10 10 10 10 10 10 4 
7 11 11 9 11 1 11 11 11 12 
7 8 10 12 10 1...

output:

3 0 2 3 0 2 2 
2 2 2 2 3 2 2 
2 2 2 3 2 2 2 
2 3 2 2 2 2 2 
2 2 2 1 2 2 2 
0 0 2 2 2 0 2 
3 3 3 3 3 3 3 
3 3 2 3 3 3 1 
2 2 2 2 2 2 2 
3 3 1 3 3 3 3 
0 2 2 2 2 2 3 
3 0 3 3 3 3 0 
3 2 3 3 3 2 3 
2 2 0 2 2 2 2 
2 1 2 2 2 1 2 
0 2 2 2 2 3 2 
3 2 2 2 2 3 2 
3 3 3 3 3 3 3 
3 1 3 2 3 3 3 
3 3 2 3 2 1 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #143:

score: 100
Accepted
time: 2ms
memory: 4008kb

input:

300
7 12 11 10 8 11 11 11 11 2 
7 10 12 10 10 10 10 4 10 10 
7 11 11 7 12 11 11 11 11 11 
7 12 10 10 10 10 10 10 11 8 
7 8 2 11 11 10 12 11 11 11 
7 11 11 12 11 11 10 11 1 9 
7 4 12 11 10 10 10 5 10 11 
7 11 11 11 10 11 1 12 11 8 
7 2 10 10 9 12 10 9 8 10 
7 10 10 3 12 11 11 11 11 11 
7 10 10 12 10 ...

output:

3 2 0 3 3 3 3 
2 2 2 2 2 2 2 
3 3 3 3 3 3 3 
2 2 2 2 2 2 3 
3 2 3 3 3 3 0 
3 3 2 3 3 1 3 
3 3 2 2 2 2 3 
3 0 3 3 3 2 3 
2 1 0 2 1 2 2 
3 3 3 3 3 2 2 
2 2 2 2 2 2 2 
2 3 2 2 3 2 3 
3 2 2 3 3 2 2 
3 3 2 2 3 3 1 
3 3 3 3 3 3 3 
3 3 2 3 3 2 3 
1 3 2 0 2 3 1 
3 3 0 3 3 3 3 
2 3 2 2 2 2 2 
3 2 2 2 3 3 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #144:

score: 100
Accepted
time: 3ms
memory: 3732kb

input:

300
7 10 11 8 12 11 11 10 11 9 
7 10 10 11 10 10 3 12 11 10 
7 10 11 10 11 5 10 10 2 12 
7 12 10 10 10 10 10 7 10 6 
7 8 2 8 11 1 12 11 11 11 
7 12 5 11 5 11 11 6 11 1 
7 10 8 1 12 9 8 8 9 8 
7 11 4 11 10 10 12 11 10 11 
7 10 11 12 10 11 10 10 1 9 
7 11 5 10 11 11 12 8 11 11 
7 11 12 2 11 11 10 1 11...

output:

3 3 2 3 1 2 3 
3 2 2 2 3 2 2 
2 4 2 2 3 2 3 
2 2 2 2 2 2 2 
3 3 3 3 3 0 0 
1 3 2 3 3 2 3 
1 0 0 1 0 2 0 
2 2 3 3 2 3 3 
2 3 2 2 3 1 2 
3 3 3 0 3 2 3 
3 3 3 2 3 3 3 
2 3 3 2 3 2 2 
1 2 2 3 0 2 2 
3 3 1 3 0 1 3 
2 2 2 2 2 2 2 
2 0 2 0 1 2 2 
3 3 3 3 3 3 3 
2 3 3 3 3 0 2 
2 2 2 2 2 2 2 
3 3 2 3 1 2 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #145:

score: 100
Accepted
time: 3ms
memory: 3764kb

input:

300
7 5 10 10 1 1 11 11 12 3 
7 12 11 11 11 10 10 10 10 5 
7 12 10 10 11 10 10 10 10 1 
7 9 10 11 1 10 10 10 12 10 
7 10 10 11 10 10 1 12 11 10 
7 10 1 4 10 10 12 10 10 10 
7 10 1 10 10 10 12 10 10 10 
7 10 12 11 11 10 11 5 10 11 
7 11 8 11 10 5 10 11 10 12 
7 12 9 10 10 11 11 11 10 1 
7 10 10 2 12 ...

output:

2 3 2 2 1 3 3 
3 3 3 2 2 2 2 
2 2 3 2 2 2 2 
2 2 2 3 1 2 2 
3 2 2 2 3 2 2 
2 2 2 2 2 3 2 
2 2 2 2 2 2 2 
3 2 2 3 3 2 3 
3 2 3 3 0 2 2 
1 2 2 3 3 3 2 
2 2 2 2 2 2 2 
3 3 0 3 3 3 0 
3 3 3 3 2 0 1 
3 2 2 3 3 3 2 
2 2 2 2 2 2 2 
2 2 2 2 2 2 2 
2 3 0 2 0 2 2 
3 3 0 3 3 3 3 
2 2 2 2 2 2 2 
2 2 2 2 2 2 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #146:

score: 100
Accepted
time: 3ms
memory: 3840kb

input:

300
7 8 8 11 11 11 12 11 10 11 
7 11 11 11 11 1 11 11 11 12 
7 9 1 9 9 9 12 1 9 9 
7 12 11 11 10 10 11 10 10 1 
7 2 11 11 11 11 3 12 11 11 
7 10 11 8 3 10 8 10 12 1 
7 8 11 5 11 10 5 12 10 10 
7 8 8 2 11 3 8 11 11 12 
7 11 11 10 7 11 10 10 12 11 
7 10 12 10 11 10 10 4 10 3 
7 12 10 10 10 10 10 10 10...

output:

3 3 3 3 2 3 0 
3 3 3 3 3 3 3 
1 1 1 1 1 1 1 
3 3 2 2 3 2 2 
3 3 3 3 3 3 3 
4 2 3 0 2 2 0 
2 2 0 3 4 3 2 
3 3 3 0 0 0 3 
3 2 3 2 3 3 2 
2 2 2 2 3 2 0 
2 2 2 2 2 2 2 
3 2 2 3 3 3 2 
3 3 3 3 2 0 2 
2 3 2 3 2 3 3 
2 2 2 2 3 2 3 
2 2 2 2 2 2 3 
3 3 3 1 3 3 1 
3 3 2 3 2 3 2 
3 2 2 3 3 3 3 
3 3 3 3 3 3 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #147:

score: 100
Accepted
time: 2ms
memory: 3820kb

input:

300
7 10 12 10 10 11 10 3 10 11 
7 11 6 10 11 10 12 11 11 2 
7 10 8 12 8 10 10 11 5 11 
7 6 10 10 10 12 9 10 10 10 
7 10 10 10 1 10 10 10 12 10 
7 10 12 10 10 10 9 3 10 10 
7 1 11 11 11 12 11 11 11 11 
7 10 10 12 10 10 10 10 5 9 
7 10 10 10 10 10 1 12 10 10 
7 9 2 11 11 9 12 11 11 11 
7 11 12 11 8 1...

output:

2 2 3 2 2 2 3 
3 2 0 3 3 2 3 
2 0 2 0 2 3 3 
1 2 2 2 2 2 2 
2 2 2 2 2 2 2 
2 2 2 1 2 2 2 
3 3 3 3 3 3 3 
2 2 2 2 2 1 2 
2 2 2 2 2 2 2 
3 1 3 3 3 3 1 
3 3 3 2 0 3 3 
2 3 1 3 2 3 2 
1 2 3 2 3 3 2 
2 2 2 2 2 2 2 
3 3 0 3 3 3 3 
2 2 0 0 0 2 2 
2 2 2 0 0 2 2 
3 3 1 1 1 3 2 
2 2 2 3 2 2 2 
2 2 2 2 2 2 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #148:

score: 100
Accepted
time: 2ms
memory: 3732kb

input:

300
7 11 10 11 11 3 11 11 10 12 
7 11 12 10 11 10 9 1 11 10 
7 6 10 10 9 12 9 9 9 1 
7 10 12 11 11 11 11 4 11 11 
7 1 11 10 10 12 11 11 2 10 
7 11 1 11 11 11 12 11 11 11 
7 12 10 10 10 10 10 10 10 1 
7 1 11 9 2 12 9 11 11 11 
7 10 10 12 10 10 8 10 1 10 
7 11 1 8 1 11 11 11 12 11 
7 12 8 7 8 2 8 8 8 ...

output:

3 2 3 3 2 3 3 
2 3 2 1 3 3 2 
1 1 1 4 1 2 2 
3 2 3 3 3 3 3 
3 2 0 2 3 3 2 
3 3 3 3 3 3 3 
2 2 2 2 2 2 2 
1 3 3 3 3 3 1 
2 2 0 2 2 2 2 
3 3 3 0 3 3 3 
0 0 0 3 0 0 0 
0 2 2 3 0 2 3 
2 2 3 0 0 0 0 
3 3 3 3 2 3 2 
0 2 3 2 3 1 3 
3 2 3 2 2 2 2 
2 2 2 2 2 2 2 
0 0 2 2 2 0 2 
2 2 2 2 2 2 2 
3 3 2 3 2 3 1 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #149:

score: 100
Accepted
time: 1ms
memory: 4004kb

input:

300
7 11 11 11 11 8 11 10 9 12 
7 8 10 11 11 1 10 11 10 12 
7 4 10 10 2 10 10 10 12 11 
7 10 12 10 10 10 10 8 10 10 
7 10 10 11 11 11 1 12 11 11 
7 11 10 11 11 1 11 10 10 12 
7 11 9 9 1 11 11 11 12 11 
7 10 10 10 1 11 11 10 12 10 
7 10 12 11 10 10 10 8 10 10 
7 10 10 10 10 10 2 12 10 10 
7 11 11 11 ...

output:

2 1 3 3 3 3 3 
3 2 3 0 2 2 3 
3 2 2 2 3 2 2 
2 2 2 2 2 2 2 
3 3 2 2 3 3 3 
2 2 3 3 2 3 3 
3 3 1 1 3 3 3 
2 2 2 2 2 3 3 
3 2 2 2 2 2 2 
2 2 2 2 2 2 2 
1 3 3 3 3 3 3 
3 3 3 3 3 3 3 
3 2 3 3 3 3 3 
3 3 3 3 3 3 3 
2 2 2 2 2 2 2 
3 1 3 3 2 2 3 
2 1 3 2 3 3 1 
0 0 3 3 0 2 2 
0 0 3 3 3 3 3 
0 2 4 2 2 2 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #150:

score: 100
Accepted
time: 2ms
memory: 3736kb

input:

300
7 1 10 10 10 12 10 11 11 10 
7 11 11 10 2 10 10 10 12 10 
7 10 10 12 10 11 11 9 2 11 
7 11 11 12 11 11 9 11 1 10 
7 1 11 10 10 12 11 11 11 10 
7 11 10 10 5 10 11 11 12 10 
7 12 10 11 10 9 10 10 11 5 
7 10 10 11 10 1 3 11 11 12 
7 1 10 10 3 12 10 10 9 10 
7 8 11 10 11 8 11 10 10 12 
7 11 6 11 10 ...

output:

2 2 3 2 3 2 2 
2 2 3 2 3 2 2 
2 2 3 2 3 3 1 
3 3 1 3 3 2 3 
3 2 3 2 3 3 2 
2 3 2 2 3 2 3 
2 3 2 1 2 2 3 
3 3 3 2 2 4 2 
2 1 1 2 2 2 2 
2 2 2 0 3 3 3 
2 3 3 3 1 3 2 
1 2 2 1 1 1 1 
2 1 3 2 2 3 3 
3 3 3 3 3 3 1 
2 0 2 3 3 3 2 
3 3 3 3 3 3 3 
3 3 3 3 3 3 3 
3 3 3 3 3 3 3 
2 2 3 2 2 3 3 
2 3 2 2 3 2 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #151:

score: 100
Accepted
time: 0ms
memory: 3840kb

input:

300
7 3 11 11 8 12 9 11 11 11 
7 10 10 10 10 10 5 12 10 10 
7 10 10 12 10 10 10 10 3 10 
7 10 12 10 10 11 8 3 10 9 
7 10 10 10 5 6 10 10 12 8 
7 10 11 8 1 11 10 11 12 10 
7 3 6 9 3 1 2 12 9 9 
7 10 12 9 10 10 10 1 10 11 
7 10 10 12 10 10 9 10 2 10 
7 9 3 9 11 11 12 10 11 11 
7 11 10 11 10 11 3 12 11...

output:

1 0 3 3 3 3 3 
2 2 2 2 2 2 2 
2 2 2 2 2 2 2 
2 2 3 0 2 2 1 
0 2 2 2 2 2 2 
2 3 3 0 2 3 2 
1 1 3 4 1 1 3 
1 2 2 2 2 2 3 
2 2 1 2 2 2 2 
3 3 3 2 3 1 1 
3 3 3 2 3 2 3 
2 2 2 2 2 2 2 
3 3 3 2 2 1 1 
1 2 2 2 0 0 2 
1 1 1 1 1 3 3 
2 2 2 2 3 2 3 
3 2 2 3 2 2 3 
2 2 2 2 2 2 2 
0 3 3 3 3 0 0 
2 2 2 2 2 2 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #152:

score: 100
Accepted
time: 3ms
memory: 3708kb

input:

300
7 10 10 3 12 11 11 7 11 11 
7 1 11 11 11 12 11 11 11 11 
7 11 11 1 12 11 10 8 10 11 
7 11 11 11 10 5 9 11 11 12 
7 10 1 11 10 10 12 11 10 10 
7 8 1 10 9 8 12 9 8 8 
7 11 8 11 11 11 12 11 11 2 
7 10 9 10 10 11 1 12 10 10 
7 10 4 11 8 10 12 10 11 11 
7 8 2 8 11 11 12 11 11 11 
7 11 11 12 11 11 11 ...

output:

3 3 2 3 3 2 2 
3 3 3 3 3 3 3 
3 2 0 2 3 3 3 
3 3 3 3 3 1 2 
2 2 2 3 2 3 2 
1 0 0 1 0 2 0 
3 3 0 3 3 3 3 
2 2 2 1 2 2 3 
0 2 3 2 3 3 2 
3 3 3 3 3 0 0 
3 3 3 3 3 3 3 
3 3 3 3 3 3 3 
3 4 3 0 3 2 3 
2 1 4 3 1 3 2 
3 2 3 2 2 2 2 
2 3 2 2 3 2 3 
2 3 1 3 3 2 3 
3 3 3 3 3 3 3 
2 3 3 3 3 3 3 
3 2 2 3 3 2 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #153:

score: 100
Accepted
time: 0ms
memory: 3828kb

input:

300
7 11 10 11 8 11 2 12 10 11 
7 2 10 10 10 12 10 10 10 8 
7 12 10 10 10 10 10 10 10 6 
7 11 10 11 2 11 8 11 12 10 
7 10 1 11 10 11 12 11 11 11 
7 7 12 10 9 8 10 2 10 9 
7 11 10 4 12 11 10 11 11 11 
7 3 11 11 11 12 11 11 11 3 
7 12 9 8 1 9 11 8 9 1 
7 11 1 1 11 11 12 11 11 11 
7 10 10 10 3 10 10 10...

output:

2 3 3 2 3 0 3 
2 2 2 0 2 2 2 
2 2 2 2 2 2 2 
2 3 2 3 3 3 0 
2 3 3 3 3 3 2 
2 4 0 2 1 2 1 
3 2 3 3 3 3 2 
3 3 3 2 3 3 3 
1 0 3 1 3 0 1 
3 3 3 3 3 3 3 
3 2 2 2 2 2 2 
2 2 2 2 2 2 2 
2 2 3 2 2 3 3 
1 2 3 3 1 3 3 
3 3 3 2 2 0 1 
2 2 2 2 3 3 1 
2 2 1 2 3 2 2 
1 1 1 1 1 4 2 
2 1 1 2 2 2 2 
3 2 2 2 3 2 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #154:

score: 100
Accepted
time: 0ms
memory: 3712kb

input:

300
7 12 11 9 4 11 11 11 11 3 
7 12 10 11 10 10 10 10 8 1 
7 10 12 10 10 7 9 1 9 3 
7 12 9 11 11 10 10 11 11 2 
7 10 10 12 10 10 10 10 2 11 
7 10 12 11 11 10 11 6 10 11 
7 8 11 11 8 11 4 12 11 11 
7 8 11 4 2 1 11 11 11 12 
7 12 10 11 10 10 10 10 10 5 
7 10 12 10 10 10 9 2 10 10 
7 11 10 11 11 3 11 1...

output:

3 1 4 3 3 3 3 
2 3 2 2 2 2 0 
2 2 2 1 2 1 2 
1 3 3 2 2 3 3 
2 2 2 2 2 3 2 
3 2 2 3 3 2 3 
3 3 0 3 3 0 3 
3 3 3 0 3 3 3 
2 3 2 2 2 2 2 
2 2 2 1 2 2 2 
3 3 3 3 2 3 3 
3 1 3 2 3 3 2 
3 3 3 3 3 3 1 
2 3 2 2 2 3 2 
3 2 3 2 3 3 2 
2 2 2 2 2 2 2 
2 2 2 2 2 2 3 
3 2 3 3 3 2 3 
2 2 3 2 3 2 2 
3 3 3 3 3 0 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #155:

score: 100
Accepted
time: 2ms
memory: 4016kb

input:

300
7 3 11 10 11 12 11 9 9 8 
7 3 10 10 10 12 10 10 10 10 
7 9 9 9 2 9 9 11 12 1 
7 11 10 10 3 11 10 10 12 11 
7 11 1 11 11 11 4 12 11 11 
7 10 11 9 1 11 9 11 12 11 
7 11 11 12 11 10 11 11 5 11 
7 11 9 2 12 11 9 8 11 11 
7 11 9 5 11 1 11 10 11 12 
7 7 10 10 10 12 10 10 10 10 
7 11 12 11 11 11 8 4 8 ...

output:

3 3 1 0 1 3 2 
2 2 2 2 2 2 2 
4 3 1 1 1 1 1 
3 2 2 2 3 3 2 
3 3 3 3 3 3 3 
3 3 3 1 2 3 1 
3 3 3 3 2 3 3 
3 1 0 3 3 3 1 
2 3 4 3 1 3 3 
2 2 2 2 2 2 2 
3 3 3 0 3 0 1 
1 0 1 3 3 3 1 
2 3 3 2 3 2 3 
2 0 2 2 0 0 3 
3 3 2 2 2 2 2 
3 2 3 2 3 2 0 
3 2 3 3 2 3 2 
3 3 2 3 3 3 3 
3 3 3 3 2 3 3 
3 3 3 2 3 4 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #156:

score: 100
Accepted
time: 0ms
memory: 4008kb

input:

300
7 4 7 10 10 12 10 1 11 10 
7 8 12 1 11 11 11 3 11 11 
7 11 12 10 8 10 10 3 10 10 
7 12 11 10 11 11 11 11 11 6 
7 4 11 10 10 12 11 11 11 10 
7 12 10 10 6 10 10 10 10 2 
7 11 11 10 11 2 10 2 9 12 
7 12 11 11 11 10 11 11 11 1 
7 10 11 11 9 11 2 12 11 10 
7 10 11 10 5 6 8 11 12 11 
7 3 11 2 11 12 11...

output:

2 2 3 2 1 0 2 
3 0 3 3 3 3 3 
2 3 2 2 0 2 2 
3 2 3 3 3 3 3 
3 2 3 2 3 3 2 
2 2 2 2 2 2 2 
4 1 2 3 3 2 3 
3 3 3 2 3 3 3 
3 2 2 3 3 1 3 
3 3 3 2 2 2 0 
3 3 3 3 3 3 3 
3 3 3 2 2 2 2 
2 2 2 2 2 3 3 
2 3 2 2 2 2 3 
3 3 2 0 2 2 3 
2 2 2 2 2 3 2 
3 3 3 3 3 3 3 
2 2 0 2 2 2 2 
0 0 0 0 3 3 3 
3 3 3 3 3 0 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #157:

score: 100
Accepted
time: 3ms
memory: 3712kb

input:

300
7 11 11 9 9 1 11 9 9 12 
7 12 10 8 8 8 8 8 8 3 
7 10 10 10 10 11 2 12 11 11 
7 12 11 11 10 10 10 11 10 3 
7 12 10 10 9 9 9 11 1 2 
7 8 2 10 9 9 12 11 10 1 
7 10 10 12 10 10 10 10 8 10 
7 11 11 10 4 8 11 11 12 11 
7 11 10 10 11 8 1 12 10 11 
7 10 12 10 11 9 10 1 10 11 
7 10 3 9 10 10 12 10 10 10 ...

output:

1 1 1 3 3 3 1 
2 0 0 0 0 0 0 
3 3 2 2 2 2 3 
3 3 2 2 2 3 2 
2 2 1 1 1 3 1 
1 1 4 3 2 2 0 
2 2 2 2 2 2 2 
3 3 3 2 3 0 3 
2 3 3 2 2 3 0 
2 2 1 2 3 2 3 
2 2 2 2 2 1 2 
2 2 2 2 2 2 2 
3 3 2 2 3 2 2 
2 4 3 2 3 2 3 
3 3 3 3 0 3 3 
2 1 2 2 2 2 1 
2 2 1 2 2 2 2 
4 1 3 2 2 2 2 
2 2 2 2 0 0 1 
3 2 2 2 3 2 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #158:

score: 100
Accepted
time: 2ms
memory: 3712kb

input:

300
7 11 10 8 11 10 1 12 3 11 
7 10 1 10 10 9 12 5 9 10 
7 10 11 10 11 4 11 11 11 12 
7 10 10 11 11 10 1 12 11 10 
7 12 10 10 10 10 10 8 10 5 
7 10 10 10 10 10 1 12 8 8 
7 10 5 10 11 10 12 11 10 11 
7 11 11 12 11 11 9 11 4 5 
7 10 9 10 1 10 10 10 12 10 
7 12 10 11 11 11 11 11 11 2 
7 12 10 10 11 10 ...

output:

2 3 3 2 0 3 2 
2 1 2 2 1 2 2 
3 3 2 2 3 3 3 
3 2 2 2 3 3 2 
2 2 2 2 2 0 2 
0 0 2 2 2 2 2 
3 2 3 3 2 2 2 
3 3 1 3 3 2 3 
2 2 1 2 2 2 2 
2 3 3 3 3 3 3 
2 2 3 2 3 3 2 
2 3 2 2 0 3 2 
2 3 2 2 2 3 3 
3 2 3 3 3 0 3 
2 2 2 2 2 1 2 
0 2 2 2 2 2 3 
3 3 3 3 3 2 2 
3 2 3 2 3 2 1 
0 1 2 1 4 2 2 
2 2 2 2 2 2 0 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #159:

score: 100
Accepted
time: 3ms
memory: 3708kb

input:

300
7 3 10 10 8 12 10 10 10 8 
7 12 10 10 10 10 10 10 10 8 
7 8 8 12 8 8 4 8 2 11 
7 11 11 11 4 11 11 11 12 11 
7 11 12 11 11 11 11 1 11 11 
7 10 8 12 10 10 10 8 7 4 
7 12 11 11 11 11 11 11 11 2 
7 4 11 12 11 11 9 11 4 11 
7 10 10 10 10 10 5 12 8 10 
7 2 12 10 10 10 9 5 11 11 
7 12 10 10 10 10 10 10...

output:

2 0 2 0 2 2 2 
2 2 2 2 2 2 2 
0 0 0 0 0 3 0 
3 3 3 3 3 3 3 
3 3 3 3 3 3 3 
2 0 2 2 2 2 0 
3 3 3 3 3 3 3 
3 3 1 3 3 3 3 
0 2 2 2 2 2 2 
2 3 2 1 2 3 3 
2 2 2 2 2 2 2 
3 1 3 3 2 3 3 
0 3 3 1 3 3 3 
2 2 2 1 3 3 1 
2 2 1 2 2 2 2 
2 2 0 2 0 0 2 
3 4 2 3 3 2 2 
2 0 2 2 2 2 0 
2 3 2 2 3 3 3 
3 3 3 3 3 3 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #160:

score: 100
Accepted
time: 2ms
memory: 3716kb

input:

300
7 10 7 10 10 11 12 10 3 10 
7 10 10 10 11 11 1 12 10 10 
7 10 10 11 1 3 11 10 12 11 
7 10 10 1 12 9 10 11 10 10 
7 12 10 10 4 11 11 10 11 3 
7 10 11 11 10 1 10 10 11 12 
7 1 11 10 10 12 11 10 10 11 
7 10 6 12 6 10 9 9 2 3 
7 10 11 3 12 11 11 11 9 11 
7 11 11 10 1 11 10 8 12 11 
7 8 7 1 12 6 2 7 ...

output:

2 3 2 2 0 2 2 
2 2 2 2 2 3 3 
3 2 2 3 2 1 3 
1 2 3 2 2 2 2 
2 2 4 3 3 2 3 
2 3 3 2 3 2 2 
3 2 2 3 2 3 2 
2 4 1 2 2 2 1 
3 3 3 1 3 2 3 
3 0 3 2 3 3 2 
2 3 2 3 3 0 0 
2 2 0 2 3 3 2 
2 2 2 2 2 2 2 
3 3 3 2 2 3 3 
1 3 2 4 3 2 3 
2 2 2 2 2 2 1 
3 1 3 3 1 3 3 
3 3 3 3 3 2 3 
3 3 3 3 3 3 3 
2 2 1 2 1 3 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #161:

score: 100
Accepted
time: 2ms
memory: 3716kb

input:

300
7 11 11 11 11 11 3 12 11 11 
7 10 10 10 1 9 10 9 12 10 
7 12 11 11 11 9 11 11 8 4 
7 7 10 10 10 2 10 10 10 12 
7 10 10 10 11 2 10 9 10 12 
7 11 10 10 3 11 11 11 12 11 
7 10 10 5 12 10 10 11 11 9 
7 1 11 11 8 12 11 10 11 11 
7 11 10 10 11 5 11 11 11 12 
7 10 10 10 1 10 10 6 12 10 
7 1 10 12 11 11...

output:

3 3 3 3 3 3 3 
2 1 2 2 2 1 2 
3 3 3 1 3 3 0 
2 2 2 4 2 2 2 
1 2 2 2 2 2 3 
3 3 2 2 3 3 3 
2 2 3 3 1 2 2 
3 0 3 3 2 3 3 
3 3 2 3 2 3 3 
2 2 2 2 2 2 2 
3 2 3 3 3 3 2 
3 3 3 3 3 3 0 
2 3 3 3 3 3 3 
2 0 2 2 2 3 2 
3 3 3 3 3 3 0 
3 3 3 2 2 2 2 
2 1 2 2 2 2 2 
3 3 2 3 3 3 3 
3 2 2 3 2 2 3 
3 3 3 0 3 3 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #162:

score: 100
Accepted
time: 2ms
memory: 3708kb

input:

300
7 10 11 6 12 11 10 10 11 10 
7 10 10 10 3 10 10 10 12 10 
7 10 10 10 2 9 10 9 12 9 
7 11 11 11 11 1 11 9 11 12 
7 8 12 7 8 8 8 6 2 10 
7 10 3 10 11 10 12 11 10 10 
7 11 11 12 11 11 11 11 1 11 
7 10 10 12 4 10 10 10 1 11 
7 10 12 10 10 9 10 2 10 10 
7 12 11 11 11 10 10 11 11 6 
7 8 12 8 1 8 8 3 1...

output:

3 2 2 3 2 2 3 
2 2 2 2 2 2 2 
1 1 2 2 2 1 2 
1 3 3 3 3 3 3 
0 0 0 0 0 4 2 
3 2 2 3 2 2 2 
3 3 3 3 3 3 3 
2 2 2 4 2 3 2 
2 2 1 2 2 2 2 
3 3 3 2 2 3 3 
0 0 0 0 3 2 3 
2 2 3 2 3 3 1 
1 3 3 3 1 3 1 
3 3 3 3 3 3 3 
3 2 3 2 3 2 2 
3 3 3 3 3 3 3 
2 2 2 2 2 2 3 
2 3 3 3 3 3 2 
3 3 3 3 3 3 3 
2 2 0 3 2 2 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #163:

score: 100
Accepted
time: 2ms
memory: 3732kb

input:

300
7 4 9 10 1 12 10 10 9 9 
7 10 12 10 10 11 10 6 10 11 
7 10 10 10 10 7 10 10 9 12 
7 12 6 10 11 10 11 11 10 4 
7 11 12 10 11 11 10 1 10 9 
7 9 12 9 11 11 6 1 11 11 
7 11 10 5 12 10 10 8 11 9 
7 11 8 12 10 10 9 11 1 11 
7 2 10 10 11 12 11 8 11 10 
7 1 10 10 11 12 10 9 10 11 
7 2 11 11 11 12 11 11 ...

output:

2 3 1 1 2 1 2 
2 2 3 2 2 2 3 
2 1 2 2 2 2 2 
4 2 3 2 3 3 2 
2 3 3 2 3 2 1 
1 1 3 2 3 3 3 
2 2 0 3 1 3 2 
3 0 1 2 2 3 3 
3 3 3 2 0 2 2 
2 3 2 3 1 2 2 
3 3 3 3 3 3 3 
2 2 2 3 2 2 2 
0 3 2 2 2 2 2 
2 2 0 3 2 2 2 
3 3 0 3 3 1 3 
3 3 3 3 3 3 3 
0 3 3 3 3 2 2 
2 2 2 2 2 2 2 
2 0 0 0 0 0 0 
3 3 1 3 3 3 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #164:

score: 100
Accepted
time: 0ms
memory: 3968kb

input:

300
7 10 10 1 12 10 10 10 9 10 
7 11 11 12 11 11 11 11 6 11 
7 10 10 10 2 10 10 10 12 10 
7 11 11 3 11 11 5 12 11 11 
7 10 1 10 10 10 12 10 10 10 
7 10 1 12 10 10 10 11 2 10 
7 10 7 12 8 8 8 9 1 11 
7 10 10 10 1 10 8 4 12 10 
7 10 10 10 4 11 10 10 12 11 
7 12 11 11 11 7 11 11 10 4 
7 10 10 10 10 8 1...

output:

2 2 2 1 2 2 2 
3 3 3 3 3 3 3 
2 2 2 2 2 2 2 
3 3 3 3 3 3 3 
2 2 2 2 2 2 2 
2 3 2 2 2 2 3 
2 0 0 0 0 3 1 
2 2 2 2 2 2 0 
3 2 2 2 2 3 2 
3 3 3 2 3 3 2 
3 2 2 2 2 3 2 
2 2 2 2 1 2 2 
1 2 3 2 2 2 2 
3 3 3 3 3 3 3 
3 3 3 3 3 0 3 
2 3 2 2 2 2 2 
3 3 3 3 3 3 3 
2 3 2 3 3 2 1 
2 3 2 2 2 3 2 
2 2 2 2 2 0 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #165:

score: 100
Accepted
time: 3ms
memory: 3712kb

input:

300
7 4 10 11 10 12 10 10 11 10 
7 10 10 11 11 9 3 12 11 11 
7 9 11 11 9 4 9 11 11 12 
7 3 8 8 8 12 11 11 11 11 
7 1 11 11 11 12 11 11 11 11 
7 11 12 9 10 11 11 1 11 11 
7 10 10 12 10 10 10 10 1 10 
7 8 11 10 2 8 8 11 12 11 
7 11 12 11 11 11 2 2 11 11 
7 11 10 6 12 10 11 11 11 10 
7 11 9 11 5 10 11 ...

output:

2 2 3 2 2 2 3 
3 3 2 2 3 3 1 
3 3 3 1 3 1 1 
3 0 3 3 3 0 0 
3 3 3 3 3 3 3 
1 3 3 3 2 3 3 
2 2 2 2 2 2 2 
3 3 3 2 0 0 0 
3 3 3 3 3 3 3 
2 3 3 3 2 3 2 
2 3 1 3 3 2 3 
2 2 3 3 3 2 2 
1 2 2 2 2 2 2 
3 3 2 2 3 2 2 
2 2 2 0 2 2 2 
2 2 2 0 3 3 3 
3 3 3 2 2 2 3 
3 3 3 2 0 3 2 
2 3 3 2 3 2 3 
2 0 2 2 2 2 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #166:

score: 100
Accepted
time: 0ms
memory: 3728kb

input:

300
7 2 10 10 11 12 10 10 10 10 
7 4 11 10 10 12 6 11 11 10 
7 11 10 3 12 8 10 10 10 11 
7 10 8 10 10 10 12 11 10 10 
7 8 10 10 10 4 1 12 11 10 
7 10 10 10 10 2 10 10 10 12 
7 5 10 10 10 12 10 3 10 10 
7 12 10 11 10 11 10 10 11 5 
7 3 11 11 10 12 11 9 10 11 
7 10 11 2 12 8 8 8 11 11 
7 10 3 9 9 9 12...

output:

2 3 2 2 2 2 2 
2 2 3 2 3 3 2 
0 2 2 2 3 3 2 
2 2 2 3 2 2 2 
3 2 0 2 2 2 0 
2 2 2 2 2 2 2 
2 2 2 2 4 2 2 
2 3 2 3 2 2 3 
3 2 2 3 1 3 3 
0 0 0 3 3 2 3 
1 1 1 1 1 1 2 
3 4 3 3 1 3 1 
3 2 2 2 3 2 2 
3 3 2 3 3 4 3 
3 2 2 3 2 2 0 
3 0 3 3 3 3 3 
2 2 2 3 2 2 2 
0 0 2 2 2 2 0 
2 0 0 0 0 1 2 
1 1 3 3 3 2 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #167:

score: 100
Accepted
time: 0ms
memory: 4008kb

input:

300
7 2 11 11 11 12 8 11 11 11 
7 10 10 2 12 10 10 4 11 9 
7 11 10 1 12 11 11 11 11 11 
7 10 11 2 12 10 11 1 10 10 
7 10 10 10 10 10 1 12 10 10 
7 1 10 10 10 12 10 10 10 10 
7 10 12 10 10 10 9 2 10 10 
7 10 10 11 11 11 4 12 11 11 
7 11 5 11 4 11 10 10 12 10 
7 1 12 11 11 11 11 1 3 11 
7 11 11 11 10 ...

output:

0 3 3 3 3 3 3 
2 2 2 3 1 2 2 
3 3 3 3 3 3 2 
2 3 1 2 2 2 3 
2 2 2 2 2 2 2 
2 2 2 2 2 2 2 
2 2 2 1 2 2 2 
3 3 2 2 3 3 3 
2 2 1 3 3 3 2 
3 3 3 3 3 2 3 
2 3 3 3 3 2 2 
3 3 3 3 3 3 3 
2 2 3 2 3 3 3 
3 2 3 2 3 3 3 
3 2 2 2 3 2 2 
0 0 0 0 0 0 0 
2 2 2 3 2 2 3 
2 2 2 2 2 2 2 
3 3 0 0 3 3 2 
3 3 3 3 3 3 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #168:

score: 100
Accepted
time: 0ms
memory: 3768kb

input:

300
7 10 10 1 12 10 10 7 8 8 
7 11 11 1 12 10 10 11 3 10 
7 11 11 11 10 1 9 11 10 12 
7 7 11 10 11 12 10 10 10 11 
7 10 10 9 10 10 5 12 10 10 
7 11 11 10 11 10 8 12 10 11 
7 11 10 10 11 2 11 11 11 12 
7 10 10 12 10 10 8 10 2 10 
7 9 12 10 10 8 10 3 11 11 
7 5 11 11 11 12 11 11 11 11 
7 3 11 11 8 12 ...

output:

2 2 2 0 0 2 2 
2 2 3 2 2 3 3 
3 2 3 3 3 1 2 
2 3 2 3 2 3 2 
2 2 2 2 1 2 2 
2 3 3 3 2 3 2 
3 3 2 3 2 3 3 
2 2 0 2 2 2 2 
2 1 0 2 2 3 3 
3 3 3 3 3 3 3 
3 0 3 3 3 3 3 
2 2 3 3 3 3 3 
0 3 1 2 3 1 2 
3 3 3 2 3 3 2 
3 2 3 2 3 3 3 
3 2 2 0 3 2 3 
1 1 1 1 3 3 1 
3 2 3 2 2 2 3 
3 3 3 3 3 3 3 
3 3 3 3 3 0 0 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #169:

score: 100
Accepted
time: 2ms
memory: 3712kb

input:

300
7 10 12 10 10 10 10 2 10 10 
7 8 11 2 12 10 10 11 10 10 
7 11 12 11 10 10 11 5 11 9 
7 2 10 10 10 12 11 11 10 11 
7 7 8 9 3 11 11 8 12 8 
7 9 10 9 1 9 3 12 9 9 
7 10 10 10 10 10 3 12 10 10 
7 11 8 12 10 10 10 10 2 10 
7 10 9 10 10 10 2 12 10 10 
7 10 10 10 2 10 10 10 12 10 
7 7 10 10 11 12 10 3 ...

output:

2 2 2 2 2 2 2 
2 2 3 2 2 0 3 
3 3 2 3 2 3 1 
3 2 2 3 3 2 2 
0 0 0 1 4 3 3 
1 1 1 2 1 3 1 
2 2 2 2 2 2 2 
3 0 2 2 2 2 2 
2 2 2 1 2 2 2 
2 2 2 2 2 2 2 
2 3 2 2 4 2 2 
1 0 3 3 3 0 0 
2 0 2 3 2 2 2 
2 3 2 2 2 2 2 
1 1 1 0 1 2 1 
2 2 2 2 0 2 2 
2 2 2 2 3 2 2 
3 3 3 3 3 3 1 
1 2 2 3 1 2 3 
0 0 1 0 3 4 0 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #170:

score: 100
Accepted
time: 3ms
memory: 4012kb

input:

300
7 10 11 12 11 10 10 11 4 9 
7 1 10 9 11 12 10 10 10 11 
7 12 10 10 11 9 9 10 11 6 
7 11 11 11 3 11 11 10 12 11 
7 10 10 10 10 10 3 12 10 10 
7 7 10 11 11 12 11 11 11 11 
7 10 12 10 10 11 11 6 11 10 
7 10 10 10 5 10 11 11 12 11 
7 10 12 10 11 10 10 1 10 10 
7 10 10 10 1 10 10 10 12 10 
7 12 11 11...

output:

2 3 2 3 2 1 3 
2 3 2 3 2 2 1 
2 2 3 1 1 2 3 
3 2 3 3 3 3 3 
2 2 2 2 2 2 2 
3 3 3 3 3 2 3 
2 2 3 3 2 3 2 
3 3 2 2 2 2 3 
2 2 2 2 3 2 2 
2 2 2 2 2 2 2 
3 3 3 2 0 3 3 
3 2 2 2 3 2 2 
2 2 4 2 1 2 1 
3 3 3 2 3 2 3 
2 2 3 2 3 3 2 
2 0 2 2 0 0 2 
2 1 2 2 2 2 3 
3 3 3 3 3 3 3 
2 2 3 3 2 3 2 
2 2 2 0 2 2 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #171:

score: 100
Accepted
time: 0ms
memory: 3732kb

input:

300
7 9 9 6 12 9 11 11 9 9 
7 12 11 11 1 11 9 11 11 3 
7 10 10 2 12 10 10 10 10 9 
7 11 10 2 12 11 11 8 11 11 
7 10 10 12 10 10 10 10 2 10 
7 10 11 5 12 11 11 11 8 11 
7 1 10 11 10 12 11 10 11 1 
7 10 12 9 10 11 10 1 11 10 
7 8 12 10 10 10 10 2 10 9 
7 10 10 6 12 5 10 11 10 10 
7 9 12 9 11 11 11 2 1...

output:

1 3 3 1 1 1 1 
3 3 3 3 1 3 3 
2 2 2 2 1 2 2 
3 3 0 3 3 3 2 
2 2 2 2 2 2 2 
3 3 3 0 3 2 3 
3 2 3 0 2 2 3 
1 2 3 2 2 3 2 
2 0 2 2 2 2 1 
0 2 3 2 2 2 2 
1 1 3 3 3 3 3 
3 3 0 1 0 1 3 
2 2 2 2 2 2 2 
3 0 2 2 3 3 0 
0 3 3 2 3 3 3 
3 3 4 3 3 3 3 
2 2 3 2 2 1 3 
2 3 2 2 2 2 1 
2 2 2 2 0 4 2 
3 2 2 3 3 3 0 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #172:

score: 100
Accepted
time: 3ms
memory: 3760kb

input:

300
7 8 10 10 10 12 10 3 10 10 
7 11 12 11 10 11 10 2 11 11 
7 10 10 11 6 10 10 10 12 1 
7 11 12 11 11 11 11 5 11 11 
7 1 10 2 10 12 10 10 11 10 
7 11 11 11 11 3 9 11 11 12 
7 8 9 2 12 9 9 11 11 11 
7 11 11 1 12 8 3 11 10 10 
7 11 10 10 3 11 11 11 12 11 
7 12 1 8 11 11 11 11 11 1 
7 11 3 11 10 2 12 ...

output:

2 2 2 2 4 2 2 
3 3 3 2 2 3 3 
4 2 2 3 2 2 2 
3 3 3 3 3 3 3 
2 2 3 2 2 2 3 
3 3 3 3 3 1 3 
1 1 3 3 3 0 1 
0 4 3 2 2 3 3 
3 3 2 2 3 3 3 
3 0 3 3 3 3 3 
2 3 2 2 2 3 3 
3 2 3 3 3 3 3 
3 2 2 2 2 2 2 
2 3 0 2 0 2 2 
3 3 3 3 3 3 3 
3 0 3 3 3 3 3 
3 2 2 3 3 3 2 
2 2 2 3 2 3 3 
3 3 3 3 3 3 3 
2 3 3 4 3 2 1 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #173:

score: 100
Accepted
time: 4ms
memory: 4024kb

input:

300
7 1 11 9 11 12 11 11 9 11 
7 12 10 10 10 10 10 10 10 8 
7 12 10 10 10 10 11 11 10 1 
7 9 9 12 9 11 9 11 1 11 
7 10 11 10 11 11 3 12 11 11 
7 11 3 11 10 11 12 8 10 10 
7 11 11 12 11 10 11 11 1 3 
7 10 8 6 12 8 8 11 8 11 
7 10 10 11 10 9 5 12 11 10 
7 10 2 10 9 10 12 10 10 10 
7 9 12 8 11 11 11 1 ...

output:

3 3 1 3 3 3 1 
2 2 2 2 2 2 2 
2 2 2 2 3 3 2 
1 1 1 1 3 3 3 
3 3 2 3 2 3 3 
2 3 2 0 2 3 3 
3 3 3 3 2 2 3 
0 0 3 0 3 2 0 
3 2 2 2 3 2 1 
1 2 2 2 2 2 2 
0 1 3 3 3 3 3 
3 3 3 3 2 3 3 
2 3 3 2 2 2 3 
3 3 1 3 3 3 2 
2 2 3 2 2 2 2 
3 3 2 2 0 3 2 
3 3 3 3 3 3 3 
0 2 2 0 2 3 2 
3 2 3 2 3 3 2 
1 3 3 3 3 3 1 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #174:

score: 100
Accepted
time: 0ms
memory: 3728kb

input:

300
7 11 10 10 10 10 3 12 11 11 
7 10 12 10 10 10 11 1 2 10 
7 9 9 9 9 3 11 11 11 12 
7 11 11 1 12 11 11 11 11 11 
7 10 6 10 10 10 12 9 10 10 
7 11 9 12 9 9 11 11 4 11 
7 10 1 10 11 11 12 10 11 10 
7 11 10 10 1 10 10 11 12 10 
7 10 12 10 10 8 10 1 10 10 
7 9 11 3 1 11 11 11 12 11 
7 10 11 11 10 4 11...

output:

3 3 3 2 2 2 2 
2 2 2 3 2 0 2 
3 3 1 1 1 3 1 
3 3 3 3 3 3 3 
2 2 2 1 2 2 2 
3 1 3 1 1 3 3 
3 3 2 2 3 2 2 
2 3 2 2 3 2 2 
2 2 0 2 2 2 2 
3 3 3 3 1 3 3 
3 3 3 2 3 3 2 
1 1 1 2 1 1 1 
3 2 3 2 2 2 2 
3 3 3 3 3 3 1 
2 3 0 3 3 2 2 
2 2 2 3 2 2 2 
2 3 2 2 3 2 3 
3 1 2 3 3 3 1 
3 2 2 3 2 2 2 
2 3 2 3 3 2 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #175:

score: 100
Accepted
time: 0ms
memory: 3776kb

input:

300
7 12 11 11 11 8 11 11 8 1 
7 10 10 8 10 5 10 11 11 12 
7 11 11 10 10 1 10 10 11 12 
7 11 1 10 11 11 12 11 10 11 
7 11 10 12 11 11 10 11 4 10 
7 9 10 10 11 11 1 12 11 11 
7 10 10 12 11 11 11 10 3 11 
7 11 11 11 11 11 1 12 11 11 
7 11 12 11 11 9 11 1 11 11 
7 3 10 11 10 12 10 11 11 10 
7 10 11 10 ...

output:

3 3 3 0 3 3 0 
3 3 0 2 2 2 2 
2 3 2 3 3 2 2 
3 3 3 3 2 2 3 
3 2 2 3 3 2 3 
3 3 1 2 2 3 3 
2 2 3 3 3 3 2 
3 3 3 3 3 3 3 
3 3 1 3 3 3 3 
2 2 3 2 3 2 3 
2 2 2 2 3 2 3 
0 3 0 3 3 0 3 
3 3 3 3 3 1 3 
2 3 3 3 3 3 3 
3 3 3 3 2 1 1 
2 2 2 2 2 2 2 
3 3 3 3 3 3 3 
2 2 2 3 2 3 2 
2 3 2 2 3 2 3 
2 2 0 0 0 0 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #176:

score: 100
Accepted
time: 2ms
memory: 3968kb

input:

300
7 10 10 10 10 1 10 10 8 12 
7 12 11 11 11 10 10 11 10 1 
7 10 10 1 12 5 8 8 10 10 
7 1 11 10 10 12 10 10 11 10 
7 4 11 11 6 12 10 11 11 10 
7 12 10 10 10 10 10 10 10 7 
7 2 10 10 11 12 11 11 11 10 
7 10 10 12 10 10 8 10 1 8 
7 10 10 2 12 10 10 10 10 10 
7 12 9 10 9 11 9 3 11 1 
7 8 11 11 11 3 11...

output:

2 0 2 2 2 2 2 
3 3 3 2 2 3 2 
2 0 0 2 2 2 2 
2 2 3 2 2 3 2 
2 2 3 2 3 3 3 
2 2 2 2 2 2 2 
3 3 3 2 3 2 2 
2 2 0 2 2 0 2 
2 2 2 2 2 2 2 
1 2 1 3 1 2 3 
3 3 3 0 3 3 3 
2 2 2 2 2 2 2 
3 3 2 2 3 3 3 
3 3 2 2 2 2 2 
3 3 3 4 3 3 3 
1 1 3 2 3 3 3 
3 1 3 2 3 3 2 
3 3 3 0 2 3 0 
0 2 2 2 2 2 2 
3 3 3 3 3 3 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #177:

score: 100
Accepted
time: 3ms
memory: 3760kb

input:

300
7 10 10 1 12 10 8 10 10 10 
7 10 11 11 10 11 8 12 11 11 
7 11 10 3 12 11 11 7 8 1 
7 8 10 1 12 10 10 10 10 10 
7 10 10 10 6 10 10 10 12 10 
7 10 11 10 2 11 11 8 12 8 
7 10 1 10 10 10 12 10 10 10 
7 10 12 10 10 10 10 5 10 10 
7 11 11 11 11 11 8 12 11 11 
7 10 11 10 10 7 8 11 10 12 
7 11 11 12 7 1...

output:

2 0 2 2 2 2 2 
3 3 2 3 3 2 3 
3 3 2 0 4 3 2 
2 2 2 2 2 0 2 
2 2 2 2 2 2 2 
0 0 3 2 2 3 3 
2 2 2 2 2 2 2 
2 2 2 2 2 2 2 
3 3 3 3 3 3 3 
3 2 2 2 3 0 2 
3 3 2 2 3 2 3 
2 2 2 2 2 2 2 
3 4 3 2 3 3 3 
3 0 3 3 3 2 3 
2 0 3 3 2 3 2 
2 3 3 2 3 2 3 
0 3 3 3 3 3 0 
3 2 3 2 2 2 3 
3 3 2 2 2 3 2 
2 2 2 2 2 2 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #178:

score: 100
Accepted
time: 3ms
memory: 3748kb

input:

300
7 11 8 1 12 11 10 8 11 11 
7 12 10 10 10 10 10 11 11 5 
7 9 8 10 11 11 12 11 11 10 
7 10 11 11 1 9 10 10 12 11 
7 10 12 10 10 6 10 2 10 10 
7 11 11 11 2 10 10 11 12 10 
7 10 7 1 12 10 10 8 8 10 
7 11 11 3 12 10 10 8 9 9 
7 11 11 1 12 2 11 11 11 11 
7 10 8 10 10 2 10 10 10 12 
7 10 12 10 9 11 11 ...

output:

3 2 0 3 3 3 0 
2 2 2 2 2 3 3 
3 3 2 3 3 2 1 
3 2 3 3 2 1 2 
2 2 2 2 2 2 2 
2 3 3 3 3 2 2 
2 2 0 0 2 2 0 
2 2 0 1 1 3 3 
3 3 3 3 3 3 3 
2 2 2 2 0 2 2 
2 2 3 3 1 3 2 
0 1 0 2 0 1 1 
2 1 3 2 2 3 2 
3 3 3 3 3 3 3 
2 2 2 3 3 3 2 
2 2 3 3 1 1 2 
2 2 0 2 0 2 2 
2 2 2 0 2 2 2 
3 1 3 3 3 3 3 
3 3 3 1 3 3 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #179:

score: 100
Accepted
time: 0ms
memory: 3968kb

input:

300
7 11 11 12 11 9 11 11 1 11 
7 10 10 11 9 6 1 12 11 11 
7 9 1 10 10 10 12 2 10 8 
7 11 8 1 12 11 11 11 11 11 
7 11 8 12 10 9 8 11 1 11 
7 11 11 5 12 11 11 11 11 11 
7 7 10 10 9 2 10 9 11 12 
7 10 11 10 11 11 2 12 11 11 
7 10 10 12 10 10 9 11 3 11 
7 10 10 1 12 8 8 8 8 8 
7 10 10 10 3 10 10 2 12 1...

output:

3 3 3 3 1 3 3 
3 3 2 2 3 1 2 
2 2 0 4 2 2 1 
3 3 3 3 3 3 0 
3 0 0 2 1 3 3 
3 3 3 3 3 3 3 
1 3 2 4 2 2 1 
3 3 2 3 2 3 3 
2 2 1 2 2 3 3 
0 0 0 0 0 2 2 
2 1 2 2 2 2 2 
3 3 3 1 3 3 1 
3 3 2 3 2 3 2 
3 3 4 3 3 3 3 
3 3 3 3 3 3 2 
3 3 3 3 3 3 3 
2 0 3 3 3 2 2 
3 3 2 3 2 3 0 
2 2 0 2 2 2 2 
2 2 2 3 3 3 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #180:

score: 100
Accepted
time: 0ms
memory: 3772kb

input:

300
7 6 10 10 10 9 5 12 10 9 
7 10 12 10 11 11 10 2 11 9 
7 11 10 11 1 11 10 11 12 11 
7 12 10 11 11 11 11 10 4 1 
7 10 10 10 10 11 1 12 10 10 
7 10 10 10 10 11 6 12 11 10 
7 10 1 11 5 10 12 10 3 11 
7 10 10 12 10 11 11 11 3 10 
7 12 10 10 11 5 10 11 11 1 
7 3 10 10 10 12 10 11 11 11 
7 11 11 11 11 ...

output:

2 1 1 2 2 2 1 
2 2 3 2 3 3 1 
3 3 2 3 3 3 2 
2 3 3 3 3 2 2 
2 2 2 2 2 2 3 
3 2 2 2 2 2 3 
2 2 3 2 2 3 2 
2 2 3 2 3 2 3 
2 2 3 2 2 3 3 
2 2 3 3 3 2 2 
3 3 3 3 3 3 2 
3 3 2 3 3 2 2 
1 0 4 1 1 3 3 
3 3 3 3 2 2 4 
1 3 3 1 3 2 3 
3 1 3 3 3 1 1 
1 2 2 2 1 2 2 
2 2 3 2 0 2 0 
2 2 2 3 3 2 3 
3 3 0 1 3 3 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #181:

score: 100
Accepted
time: 0ms
memory: 3716kb

input:

300
7 10 11 12 11 11 11 11 2 11 
7 11 11 11 11 11 7 12 11 11 
7 10 10 11 10 10 5 12 10 10 
7 11 12 11 11 11 11 2 11 11 
7 10 11 1 12 11 11 10 11 11 
7 9 2 10 10 10 12 10 11 11 
7 11 11 5 6 11 11 11 12 11 
7 11 10 11 11 10 8 12 10 9 
7 10 10 5 12 9 9 9 9 9 
7 4 3 6 10 12 10 10 11 10 
7 10 12 10 10 10...

output:

2 3 3 3 3 3 3 
3 3 3 3 3 3 3 
2 2 2 2 3 2 2 
3 3 3 3 3 3 3 
3 3 2 3 3 2 3 
2 2 3 2 3 2 1 
3 3 3 3 3 3 3 
2 1 3 2 3 3 2 
1 1 1 1 1 2 2 
2 2 3 2 2 3 0 
2 2 2 2 2 2 0 
3 2 1 2 2 2 1 
2 4 2 0 0 0 2 
2 3 2 2 2 2 2 
3 2 3 3 3 3 3 
3 3 3 3 3 3 3 
3 3 3 1 3 3 3 
2 2 2 3 1 3 2 
2 3 2 3 2 2 3 
3 3 3 3 3 2 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #182:

score: 100
Accepted
time: 3ms
memory: 3776kb

input:

300
7 2 12 11 11 11 11 3 11 11 
7 12 10 10 10 11 11 9 10 2 
7 10 10 10 10 10 1 12 8 7 
7 1 10 6 10 12 1 10 10 11 
7 10 11 11 7 2 10 10 10 12 
7 3 10 12 11 10 10 11 3 11 
7 12 11 11 11 8 10 10 11 1 
7 10 6 11 11 2 12 10 10 11 
7 7 10 10 10 10 4 12 9 10 
7 10 10 10 10 10 3 12 10 10 
7 10 10 9 1 10 10 ...

output:

3 3 3 3 3 3 3 
2 2 2 3 3 1 2 
0 2 2 2 2 2 2 
3 2 2 3 2 2 0 
2 2 3 2 3 2 2 
3 2 2 3 2 3 3 
3 3 3 0 2 2 3 
3 3 3 2 2 3 2 
1 2 4 2 2 2 2 
2 2 2 2 2 2 2 
2 2 2 1 2 2 2 
2 2 0 1 2 2 2 
2 0 1 1 0 1 2 
3 3 3 3 3 3 1 
0 0 2 2 0 2 3 
3 1 3 3 3 1 1 
3 3 3 3 3 3 3 
2 0 2 2 2 2 1 
2 2 2 2 2 1 2 
3 2 2 1 2 2 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #183:

score: 100
Accepted
time: 3ms
memory: 3728kb

input:

300
7 10 10 12 8 10 4 8 1 7 
7 10 10 12 10 10 10 10 3 10 
7 12 11 10 3 11 11 10 11 1 
7 12 6 7 8 3 1 8 2 1 
7 10 12 10 11 10 10 2 11 11 
7 10 10 10 6 10 4 12 10 1 
7 12 11 11 11 10 11 8 11 2 
7 10 10 10 7 10 6 12 2 9 
7 1 11 8 10 12 11 11 11 11 
7 11 11 11 11 11 2 12 11 11 
7 10 10 12 10 7 10 11 1 1...

output:

2 2 0 0 2 2 0 
2 2 2 2 2 2 2 
3 2 1 3 3 2 3 
4 0 0 1 3 0 0 
2 2 2 2 3 3 3 
2 4 2 2 2 2 2 
3 3 3 2 3 0 3 
4 1 2 2 2 2 2 
3 2 3 3 3 3 0 
3 3 3 3 3 3 3 
2 2 2 2 2 2 3 
3 3 3 3 3 3 3 
3 2 3 3 3 3 1 
2 2 2 2 2 2 2 
0 2 3 2 0 2 2 
2 2 0 2 2 2 1 
3 3 3 3 1 3 3 
3 3 3 3 3 3 3 
2 0 1 0 1 2 0 
3 3 2 2 3 2 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #184:

score: 100
Accepted
time: 0ms
memory: 3968kb

input:

300
7 10 7 1 12 1 4 11 8 9 
7 6 10 7 8 1 9 2 9 12 
7 10 6 10 10 1 10 10 10 12 
7 10 10 10 10 11 3 12 10 11 
7 11 11 6 11 11 2 12 11 11 
7 11 9 1 12 11 11 11 11 11 
7 10 11 8 11 11 3 12 8 11 
7 10 10 5 5 11 11 11 12 5 
7 8 12 11 11 11 11 5 11 11 
7 10 9 2 12 10 1 10 10 10 
7 10 10 12 11 10 11 10 6 6 ...

output:

3 0 3 0 1 2 0 
4 1 0 1 2 1 0 
2 2 2 2 4 2 2 
2 3 2 2 2 2 3 
3 3 3 3 0 3 3 
3 3 3 3 3 3 1 
0 3 2 3 0 3 3 
2 3 2 4 2 3 3 
3 0 3 3 3 3 3 
2 3 2 2 2 2 1 
2 2 3 3 2 2 2 
3 3 3 3 3 3 3 
2 2 2 2 2 2 2 
2 2 3 0 2 3 3 
3 3 1 3 3 3 3 
2 2 2 1 2 2 0 
0 3 2 3 2 2 3 
2 3 2 2 2 2 2 
3 3 3 3 3 3 3 
3 3 2 3 3 3 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #185:

score: 100
Accepted
time: 1ms
memory: 4008kb

input:

300
7 10 10 10 1 10 10 10 12 10 
7 12 6 10 10 10 10 10 10 2 
7 10 9 10 10 10 1 12 9 10 
7 1 9 9 9 12 9 9 11 11 
7 11 1 11 11 11 12 11 11 11 
7 10 10 10 8 10 10 10 12 10 
7 11 11 1 12 11 11 11 11 7 
7 11 10 11 5 10 11 11 12 11 
7 9 1 11 11 9 12 3 11 10 
7 1 9 11 4 11 11 11 12 11 
7 11 8 1 12 11 1 11 ...

output:

2 2 2 2 2 2 2 
4 2 2 2 2 2 2 
1 2 2 1 2 2 2 
1 1 3 3 1 1 1 
3 3 3 3 3 3 3 
2 2 2 2 2 2 2 
3 3 3 3 2 3 3 
3 3 2 3 3 2 3 
3 1 2 2 3 3 1 
3 3 1 3 3 3 3 
3 3 3 3 3 3 0 
2 2 2 2 2 2 2 
2 2 1 2 2 1 2 
2 2 2 2 2 2 1 
3 1 3 3 3 3 3 
2 2 2 3 1 3 2 
3 3 3 3 3 3 1 
2 4 3 3 3 3 3 
3 2 2 2 3 2 3 
2 2 2 2 2 2 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #186:

score: 100
Accepted
time: 0ms
memory: 3928kb

input:

300
7 10 10 10 3 10 11 11 12 10 
7 11 11 3 12 3 10 11 11 11 
7 1 10 10 10 12 10 10 10 10 
7 11 11 12 11 9 9 11 2 11 
7 11 11 11 1 11 11 11 12 11 
7 11 10 12 11 11 11 8 4 11 
7 10 12 10 3 10 10 8 10 10 
7 10 11 12 11 11 11 11 7 11 
7 10 1 10 9 10 12 11 11 10 
7 10 10 1 12 10 11 10 11 11 
7 12 11 10 1...

output:

2 3 2 2 2 2 3 
1 2 3 3 3 3 3 
2 2 2 2 2 2 2 
3 3 1 3 1 3 3 
3 3 3 3 3 3 3 
3 2 3 3 3 3 0 
2 2 2 2 3 2 2 
2 3 3 3 3 3 3 
1 2 2 3 3 2 2 
2 3 2 3 3 2 2 
3 2 2 3 2 2 2 
2 2 2 2 2 2 2 
3 3 3 3 3 0 3 
3 2 2 2 2 4 2 
2 2 2 2 2 2 1 
1 3 3 3 1 1 3 
0 1 3 3 1 2 2 
2 2 2 2 2 2 0 
0 2 3 2 2 0 2 
2 1 0 2 2 3 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #187:

score: 100
Accepted
time: 2ms
memory: 3708kb

input:

300
7 10 7 11 10 10 12 4 10 10 
7 10 10 10 9 10 4 12 10 10 
7 11 11 3 12 10 11 11 11 10 
7 12 11 7 11 10 10 11 11 2 
7 10 10 10 10 5 10 10 3 12 
7 8 4 11 1 8 11 2 12 11 
7 11 10 11 10 1 11 11 11 12 
7 1 10 11 8 12 11 11 11 11 
7 10 10 3 12 8 4 11 11 11 
7 10 10 12 8 10 10 8 5 10 
7 4 10 10 9 12 10 1...

output:

2 2 2 2 2 3 2 
2 2 2 2 2 1 2 
2 3 3 3 2 3 3 
3 0 3 2 2 3 3 
2 0 2 2 2 2 2 
3 4 3 3 0 0 3 
3 3 3 3 2 3 2 
3 0 3 3 3 2 3 
0 0 3 3 3 2 2 
2 2 2 0 2 2 0 
2 1 2 3 2 2 2 
3 3 0 0 3 3 3 
3 3 3 3 3 3 3 
0 0 1 3 3 3 1 
3 3 3 2 0 3 3 
2 2 0 2 2 2 2 
2 3 3 2 2 3 3 
2 3 3 3 3 3 2 
2 2 2 2 1 1 1 
3 3 3 2 3 3 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #188:

score: 100
Accepted
time: 3ms
memory: 3732kb

input:

300
7 10 10 10 10 2 9 10 10 12 
7 12 11 11 11 4 10 11 11 1 
7 12 10 10 10 10 10 10 8 8 
7 2 1 11 11 10 12 2 11 11 
7 10 10 12 10 10 10 10 5 10 
7 8 11 11 11 11 1 12 11 11 
7 11 10 11 10 3 10 10 10 12 
7 11 1 8 11 11 12 11 11 11 
7 11 11 10 11 5 10 11 1 12 
7 10 9 12 10 10 10 10 6 10 
7 12 11 11 11 5...

output:

2 2 2 2 2 1 2 
3 3 3 0 2 3 3 
2 2 2 2 2 2 0 
3 2 3 4 3 3 3 
2 2 2 2 2 2 2 
3 3 0 3 3 3 3 
2 2 3 3 2 2 2 
3 3 3 3 3 0 3 
3 1 2 3 3 2 3 
2 1 2 2 2 2 2 
3 3 3 0 3 3 3 
2 2 2 1 2 2 2 
3 2 2 3 2 3 3 
1 2 2 2 2 2 2 
2 2 3 3 2 2 2 
2 2 2 0 2 2 2 
2 2 3 2 2 3 3 
3 3 3 3 3 0 3 
3 3 3 3 3 0 3 
2 2 2 3 3 3 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #189:

score: 100
Accepted
time: 0ms
memory: 3764kb

input:

300
7 2 10 10 11 12 11 11 11 11 
7 10 10 10 6 10 10 10 12 10 
7 11 1 10 10 9 12 10 10 9 
7 8 9 11 9 12 9 11 9 9 
7 12 11 11 11 8 11 11 11 3 
7 1 10 10 6 12 10 11 10 10 
7 12 10 10 8 10 3 11 10 2 
7 10 1 10 10 10 12 10 10 10 
7 10 1 3 10 10 12 10 10 10 
7 8 10 9 8 9 3 12 6 1 
7 10 8 10 11 10 2 12 8 1...

output:

3 3 3 3 3 2 2 
2 2 2 2 2 2 2 
2 1 1 2 2 2 3 
1 1 1 1 3 1 3 
3 3 3 0 3 3 3 
2 2 2 2 3 2 2 
2 2 0 2 4 3 2 
2 2 2 2 2 2 2 
2 2 2 2 2 3 2 
2 4 0 2 1 0 1 
0 4 2 0 2 3 2 
2 2 2 2 1 2 2 
2 1 0 2 1 2 2 
3 3 2 3 3 3 3 
3 3 3 3 3 3 3 
3 3 3 3 3 4 1 
3 3 1 2 3 1 3 
2 2 2 2 2 2 2 
3 3 3 3 3 3 3 
2 0 3 2 2 2 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #190:

score: 100
Accepted
time: 0ms
memory: 3728kb

input:

300
7 1 11 11 11 12 10 11 10 11 
7 6 10 10 10 4 10 10 9 12 
7 12 9 10 10 8 8 8 4 4 
7 3 10 10 10 12 10 10 10 10 
7 11 10 8 11 11 4 12 11 11 
7 12 10 10 10 8 2 11 10 4 
7 8 8 10 2 8 10 10 12 10 
7 10 11 11 10 10 2 12 11 10 
7 12 11 10 11 11 10 4 11 3 
7 12 10 10 10 10 10 3 10 4 
7 10 12 10 10 10 10 1...

output:

2 3 2 3 3 3 3 
2 1 2 1 2 2 2 
1 2 2 0 0 0 2 
2 2 2 2 2 2 2 
3 3 3 2 0 3 3 
2 2 2 0 3 3 2 
2 2 0 2 0 0 2 
3 2 2 3 3 2 2 
3 2 3 3 2 2 3 
2 2 2 2 2 4 2 
2 2 2 2 2 2 2 
3 3 3 3 3 3 3 
2 2 2 3 2 3 2 
3 4 3 3 3 3 3 
3 3 2 2 3 2 2 
3 2 2 0 3 2 3 
2 2 2 2 2 0 2 
1 2 2 2 2 2 2 
2 2 1 2 2 2 2 
3 3 3 3 3 3 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #191:

score: 100
Accepted
time: 0ms
memory: 3712kb

input:

300
7 8 10 10 2 10 11 11 12 10 
7 11 10 3 12 2 10 10 10 11 
7 12 10 10 10 10 10 11 11 5 
7 11 10 3 12 9 11 11 9 11 
7 11 11 11 1 11 8 11 12 11 
7 10 12 10 6 9 9 2 11 1 
7 9 10 12 11 9 11 11 1 11 
7 11 11 5 2 11 11 11 12 11 
7 10 10 10 10 2 10 10 10 12 
7 11 10 10 8 10 10 5 12 10 
7 3 1 11 11 12 11 1...

output:

2 3 2 2 0 2 3 
3 2 2 2 3 3 2 
2 2 2 2 2 3 3 
1 3 3 1 3 3 2 
3 3 3 3 3 3 0 
2 2 1 1 2 3 4 
1 2 3 3 1 3 3 
3 3 3 4 3 3 3 
2 2 2 2 2 2 2 
2 2 2 2 3 2 2 
3 3 3 3 3 3 3 
3 1 2 3 1 2 2 
3 3 1 3 3 3 1 
2 2 2 2 4 1 2 
3 3 3 3 3 3 3 
3 3 3 3 3 3 3 
2 2 2 2 2 2 1 
0 1 1 2 2 2 2 
2 2 2 2 2 2 4 
3 3 2 3 2 3 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #192:

score: 100
Accepted
time: 0ms
memory: 4004kb

input:

300
7 10 11 11 10 11 6 12 11 11 
7 10 10 3 12 11 11 11 11 10 
7 12 10 10 10 10 10 9 11 1 
7 2 11 11 11 12 11 11 11 11 
7 9 12 8 10 10 4 5 9 10 
7 11 11 11 4 11 11 8 12 11 
7 12 11 10 10 10 11 8 10 8 
7 10 10 11 10 5 9 10 10 12 
7 2 10 10 11 12 10 11 11 11 
7 12 10 10 10 10 10 10 10 4 
7 10 10 2 12 1...

output:

3 3 2 3 3 2 3 
3 3 3 3 2 2 2 
2 2 2 2 2 1 3 
3 3 3 3 3 3 3 
0 1 2 4 2 1 2 
3 0 3 3 3 3 3 
3 2 2 2 3 0 2 
2 2 3 2 2 1 2 
2 3 3 3 3 2 2 
2 2 2 2 2 2 2 
3 3 2 2 2 2 2 
3 3 3 3 0 3 3 
2 1 2 2 2 2 3 
3 1 1 1 1 3 3 
0 2 3 3 1 3 2 
3 3 3 1 3 3 3 
3 2 3 1 2 2 3 
2 3 3 3 3 3 3 
3 3 3 1 3 3 3 
2 2 2 2 2 2 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #193:

score: 100
Accepted
time: 3ms
memory: 3712kb

input:

300
7 10 4 11 11 10 12 11 11 11 
7 10 11 10 2 11 11 11 12 11 
7 10 10 10 10 10 1 12 10 10 
7 11 11 12 11 11 11 11 1 7 
7 8 10 1 12 11 10 10 8 11 
7 11 1 11 11 10 12 11 10 11 
7 10 10 10 10 10 2 12 10 10 
7 11 11 12 11 10 10 1 5 10 
7 11 11 11 1 11 10 11 12 11 
7 11 12 11 10 11 4 1 11 11 
7 9 9 12 11...

output:

3 2 3 3 3 3 2 
3 3 3 2 2 3 3 
2 2 2 2 2 2 2 
3 3 3 3 3 2 3 
3 2 2 0 3 0 2 
3 2 3 3 2 3 3 
2 2 2 2 2 2 2 
3 3 2 3 2 2 1 
3 3 3 3 3 3 2 
3 3 3 0 2 3 3 
1 1 3 3 1 3 3 
1 3 3 3 3 3 3 
3 2 1 3 3 2 3 
2 1 3 3 3 3 3 
2 2 2 2 2 2 2 
0 1 2 2 2 2 2 
3 2 0 2 3 1 2 
2 2 2 3 2 2 2 
3 2 3 3 3 1 3 
3 3 3 3 3 3 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #194:

score: 100
Accepted
time: 3ms
memory: 3924kb

input:

300
7 10 12 11 11 11 9 2 8 8 
7 7 10 10 10 10 2 12 10 10 
7 3 10 11 11 12 11 11 11 11 
7 11 11 10 10 10 2 12 10 10 
7 11 11 9 11 11 1 12 11 11 
7 1 10 10 8 12 9 11 1 9 
7 10 3 10 10 10 12 10 10 10 
7 10 8 1 12 11 10 11 10 10 
7 1 11 10 10 12 11 4 10 10 
7 8 8 8 11 3 8 8 8 12 
7 10 10 10 2 10 10 9 12...

output:

3 2 3 1 3 0 0 
2 2 4 2 2 2 2 
3 3 3 3 3 2 3 
2 2 3 3 2 2 2 
3 3 3 3 1 3 3 
1 0 4 1 3 2 2 
2 2 2 2 2 2 2 
3 2 3 2 2 2 0 
3 2 2 2 2 3 2 
0 0 0 0 0 0 3 
2 1 2 2 2 2 2 
1 3 3 1 2 3 4 
3 3 0 3 3 2 3 
2 2 2 2 2 3 2 
2 2 2 2 2 0 2 
2 2 2 2 2 2 2 
3 3 3 3 3 3 3 
3 3 3 3 3 3 3 
3 3 3 2 2 2 2 
3 3 1 3 3 3 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #195:

score: 100
Accepted
time: 1ms
memory: 3768kb

input:

300
7 11 12 11 10 11 10 1 11 11 
7 10 12 11 10 10 9 6 10 11 
7 6 11 11 2 12 11 11 11 11 
7 10 2 10 10 10 12 10 8 8 
7 11 12 11 11 11 11 1 11 11 
7 12 10 10 10 10 10 10 10 8 
7 10 10 10 10 3 10 9 10 12 
7 8 4 12 11 8 11 11 1 11 
7 10 1 10 10 7 12 11 10 10 
7 11 11 12 11 11 10 11 5 11 
7 10 12 10 10 1...

output:

3 3 3 2 2 3 3 
3 2 2 1 2 2 3 
3 3 3 3 3 3 3 
2 2 0 2 0 2 2 
3 3 3 3 3 3 3 
2 2 2 2 2 2 2 
1 2 2 2 2 2 2 
0 3 3 3 0 3 3 
2 2 2 3 2 2 2 
3 3 2 3 3 3 3 
2 2 3 3 2 3 3 
2 3 2 2 3 3 3 
3 2 2 1 2 3 2 
1 3 3 3 3 3 2 
2 2 3 3 4 3 2 
3 3 3 2 3 2 2 
2 2 3 2 3 3 3 
3 2 2 2 2 2 1 
2 2 2 2 2 2 2 
2 2 2 2 2 3 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #196:

score: 100
Accepted
time: 3ms
memory: 3736kb

input:

300
7 4 11 12 11 11 11 11 2 11 
7 11 10 10 4 11 11 10 12 11 
7 11 11 8 1 8 10 10 12 10 
7 12 10 10 10 10 10 10 10 5 
7 11 5 10 10 11 12 11 11 10 
7 10 12 10 11 2 10 4 11 9 
7 1 10 9 8 12 9 3 2 9 
7 11 11 12 11 11 11 11 3 11 
7 8 12 11 11 11 11 4 11 11 
7 11 11 9 11 11 1 12 11 11 
7 10 10 10 9 6 10 4...

output:

3 3 3 3 3 3 3 
3 2 2 2 3 3 3 
2 2 3 0 3 0 2 
2 2 2 2 2 2 2 
2 3 2 3 3 2 3 
2 2 3 2 3 3 1 
1 0 0 1 2 2 1 
3 3 3 3 3 3 3 
3 0 3 3 3 3 3 
3 3 3 3 1 3 3 
2 2 2 2 2 2 1 
3 2 2 3 3 2 3 
0 0 0 0 0 3 3 
3 3 2 3 4 3 2 
2 2 2 2 2 2 2 
3 1 3 2 3 3 3 
2 2 2 2 2 0 2 
2 2 2 2 3 3 3 
3 3 0 0 0 3 3 
2 2 1 2 3 1 4 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #197:

score: 100
Accepted
time: 2ms
memory: 3716kb

input:

300
7 10 12 9 10 11 10 1 11 10 
7 11 11 11 11 11 1 12 11 11 
7 12 8 8 11 8 11 11 11 3 
7 10 10 10 7 4 1 11 12 1 
7 4 12 9 10 10 10 3 10 10 
7 8 12 8 8 8 8 6 8 10 
7 10 12 10 10 10 10 7 10 10 
7 10 12 10 11 10 10 5 10 10 
7 10 11 8 12 11 11 10 11 10 
7 11 8 2 12 11 11 8 11 11 
7 11 12 11 11 11 11 1 1...

output:

1 2 3 2 2 3 2 
3 3 3 3 3 3 3 
0 0 3 0 3 3 3 
4 3 2 2 2 1 3 
1 3 2 2 2 2 2 
0 0 0 0 0 0 2 
2 2 2 2 2 2 2 
2 2 2 2 3 2 2 
3 3 2 3 2 2 3 
3 3 0 3 3 3 0 
3 3 3 3 3 3 3 
2 2 2 2 3 2 3 
3 3 3 3 3 3 3 
3 3 3 3 3 3 3 
3 3 3 3 1 3 3 
3 2 3 2 3 2 3 
3 3 3 2 2 2 1 
3 3 3 3 3 3 3 
2 2 0 0 2 0 0 
3 4 3 3 3 3 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #198:

score: 100
Accepted
time: 2ms
memory: 3728kb

input:

300
7 8 8 5 8 8 1 12 8 8 
7 11 11 12 11 11 11 11 5 11 
7 10 11 9 10 7 3 12 10 10 
7 11 4 1 12 11 11 10 11 11 
7 11 10 3 12 10 10 11 11 11 
7 11 1 11 8 10 12 11 10 11 
7 11 8 2 12 11 8 8 11 11 
7 11 2 8 10 10 12 10 10 11 
7 11 9 12 11 11 11 11 3 11 
7 9 1 10 4 11 12 11 11 11 
7 10 10 11 1 10 10 10 12...

output:

0 0 0 0 4 0 0 
3 3 3 3 3 3 3 
2 2 2 3 1 2 2 
3 3 2 3 3 3 3 
2 2 3 3 3 3 2 
0 2 3 3 2 3 3 
3 0 0 3 3 3 0 
2 2 3 2 2 0 3 
3 1 3 3 3 3 3 
4 3 3 3 3 2 1 
1 2 2 3 2 2 2 
2 2 2 1 2 3 2 
1 1 2 2 3 2 3 
1 1 1 1 3 3 3 
2 2 3 2 3 3 2 
2 2 2 2 2 3 0 
2 2 2 2 2 2 2 
3 1 2 3 2 2 2 
2 2 2 2 0 3 2 
2 2 3 3 0 3 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #199:

score: 100
Accepted
time: 0ms
memory: 3712kb

input:

300
7 12 9 9 9 9 11 11 9 1 
7 11 12 11 11 10 11 6 11 9 
7 11 10 12 11 11 10 11 1 11 
7 11 11 11 1 11 11 10 12 11 
7 11 10 10 4 11 11 9 12 10 
7 10 10 11 2 10 10 10 12 10 
7 11 12 11 10 10 10 3 10 11 
7 11 9 8 12 11 10 10 11 10 
7 10 10 10 10 1 10 5 8 12 
7 10 10 1 12 10 10 8 10 9 
7 4 11 11 11 12 10...

output:

1 1 1 1 3 3 1 
3 3 2 3 3 3 1 
3 2 2 3 3 3 3 
3 2 3 3 3 3 3 
2 1 2 2 3 3 3 
2 2 2 3 2 2 2 
3 3 2 2 2 2 3 
3 2 2 3 2 3 1 
2 0 2 2 2 2 2 
2 2 0 2 1 2 2 
2 3 2 3 2 3 3 
2 2 2 2 2 2 1 
3 3 0 3 2 3 3 
2 3 3 3 3 2 3 
2 2 3 2 1 0 2 
2 2 2 2 2 2 2 
3 3 2 3 3 4 3 
3 2 3 2 2 2 2 
3 3 3 3 2 3 3 
2 2 2 0 2 3 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #200:

score: 100
Accepted
time: 3ms
memory: 3772kb

input:

300
7 10 11 1 12 10 8 10 10 8 
7 11 11 11 1 11 11 8 12 11 
7 10 10 12 10 10 10 10 3 10 
7 11 8 11 11 11 12 11 11 11 
7 10 10 9 1 11 10 10 12 10 
7 10 10 4 12 10 10 10 2 10 
7 8 12 10 11 11 11 8 11 11 
7 10 6 12 8 10 6 4 1 6 
7 12 10 10 10 10 10 9 9 1 
7 10 12 11 10 10 10 4 11 10 
7 1 10 11 10 12 10 ...

output:

2 0 2 2 0 2 3 
3 0 3 3 3 3 3 
2 2 2 2 2 2 2 
3 3 3 3 3 3 3 
2 2 2 1 2 3 2 
2 2 2 4 2 2 2 
2 0 3 3 3 3 3 
2 4 2 0 2 2 2 
2 2 2 2 2 1 1 
3 2 2 2 2 3 2 
2 2 2 2 0 2 3 
1 3 2 1 1 2 1 
0 2 3 3 2 2 3 
0 0 0 0 0 3 0 
1 0 1 1 3 3 3 
3 3 3 3 3 1 3 
2 2 2 1 2 2 2 
3 3 3 3 2 2 2 
1 2 2 2 2 1 2 
3 3 3 3 3 3 1 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #201:

score: 100
Accepted
time: 0ms
memory: 3948kb

input:

300
7 11 11 12 10 8 10 10 3 11 
7 10 8 11 7 11 10 11 12 10 
7 12 11 9 11 11 11 3 11 6 
7 1 10 8 10 12 11 11 11 10 
7 12 10 11 11 8 11 10 11 2 
7 11 9 12 10 11 11 11 2 10 
7 10 10 12 10 10 10 10 1 9 
7 10 2 10 10 10 12 10 10 11 
7 6 5 10 10 12 6 8 8 3 
7 12 11 11 11 11 11 11 11 3 
7 10 10 10 5 10 10 ...

output:

3 3 2 2 0 3 2 
2 3 0 3 2 3 2 
3 1 3 3 3 4 3 
3 2 3 2 3 2 0 
2 3 3 0 3 2 3 
3 1 3 2 3 2 3 
2 2 2 2 2 1 2 
2 2 3 2 2 2 2 
2 2 0 0 0 3 2 
3 3 3 3 3 3 3 
2 2 2 2 2 2 2 
1 2 1 2 2 2 2 
3 3 2 1 3 3 2 
2 2 4 3 2 2 2 
2 2 2 2 2 2 3 
2 3 2 2 2 2 2 
2 2 2 0 2 1 1 
3 3 2 3 3 2 3 
0 3 3 0 0 0 0 
3 3 2 3 2 3 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #202:

score: 100
Accepted
time: 0ms
memory: 3716kb

input:

300
7 11 10 10 10 5 10 10 10 12 
7 8 8 12 11 10 10 10 2 6 
7 10 10 10 10 2 10 10 10 12 
7 11 10 10 10 5 11 11 5 12 
7 8 8 10 11 1 10 8 11 12 
7 11 10 10 10 8 1 12 10 10 
7 8 10 10 10 1 11 10 10 12 
7 4 10 11 10 12 11 11 11 11 
7 10 9 12 10 9 10 11 1 9 
7 11 10 11 11 11 3 12 10 11 
7 8 10 1 12 10 10 ...

output:

2 2 2 3 2 2 2 
0 0 2 3 2 2 2 
2 2 2 2 2 2 2 
3 2 2 3 2 3 2 
0 3 2 0 0 2 3 
2 2 3 2 2 2 0 
2 2 2 0 2 3 2 
3 2 3 3 3 2 3 
2 1 2 2 1 1 3 
2 3 3 2 3 3 3 
2 2 2 2 3 0 2 
1 2 2 2 2 2 2 
2 3 2 2 3 2 2 
1 1 2 2 2 1 1 
0 1 3 3 3 3 3 
3 3 2 3 3 2 2 
0 0 0 0 0 0 0 
3 2 2 2 1 2 3 
2 0 2 2 2 2 2 
0 2 2 2 2 2 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #203:

score: 100
Accepted
time: 3ms
memory: 3708kb

input:

300
7 10 7 10 10 10 12 10 10 10 
7 3 9 9 11 12 11 11 11 11 
7 12 10 3 10 11 10 10 10 2 
7 12 10 11 11 11 11 11 11 1 
7 12 11 10 11 10 10 11 8 4 
7 10 10 10 10 5 9 9 10 12 
7 10 10 12 10 5 10 10 1 10 
7 4 10 10 10 12 10 8 11 11 
7 9 12 9 10 9 10 1 8 9 
7 10 12 10 10 10 10 4 11 10 
7 10 10 10 10 10 6 ...

output:

2 2 2 2 2 2 2 
3 3 3 3 3 1 1 
2 3 2 3 2 2 2 
2 3 3 3 3 3 3 
3 2 3 2 2 3 0 
1 2 2 2 2 1 2 
2 2 2 2 2 2 2 
2 2 3 3 0 2 2 
1 1 1 2 2 0 1 
2 2 2 2 2 3 2 
3 2 2 2 2 2 2 
2 2 2 2 2 2 2 
2 2 3 2 2 3 3 
2 3 3 3 3 2 2 
3 3 3 3 3 0 3 
1 3 0 3 3 3 3 
3 2 4 3 2 2 2 
2 2 2 2 2 2 2 
3 1 3 2 3 2 3 
2 2 3 3 3 3 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #204:

score: 100
Accepted
time: 2ms
memory: 3968kb

input:

300
7 11 12 9 11 9 11 1 9 11 
7 12 10 10 10 10 10 10 10 4 
7 3 11 11 11 12 11 11 11 11 
7 10 10 12 10 10 10 11 1 9 
7 10 1 11 11 10 12 11 8 11 
7 11 1 11 8 11 12 11 11 8 
7 10 2 10 10 9 12 10 10 10 
7 12 11 10 8 11 9 11 4 2 
7 7 10 11 11 12 10 11 9 11 
7 10 12 11 11 11 11 1 3 11 
7 11 10 10 11 11 1 ...

output:

1 3 1 3 3 1 3 
2 2 2 2 2 2 2 
3 3 3 3 3 3 3 
2 2 2 2 2 1 3 
3 2 3 3 0 3 2 
0 3 0 3 3 3 3 
2 1 2 2 2 2 2 
3 2 0 3 1 3 2 
2 3 1 3 3 2 3 
3 2 3 3 3 2 3 
2 2 3 2 2 3 3 
3 3 3 3 3 3 3 
3 3 3 3 3 3 3 
3 3 3 2 2 3 3 
3 2 1 0 2 3 2 
3 3 3 3 3 3 2 
2 3 2 2 3 1 2 
2 2 2 2 2 2 2 
3 3 2 3 3 3 3 
3 3 2 3 3 3 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #205:

score: 100
Accepted
time: 3ms
memory: 3760kb

input:

300
7 10 2 11 10 11 12 10 10 10 
7 12 8 10 11 11 10 10 10 4 
7 12 11 11 11 11 9 11 11 1 
7 10 10 10 4 10 1 12 10 10 
7 1 10 10 11 12 11 11 10 10 
7 11 12 11 11 11 9 4 2 9 
7 10 10 11 11 10 3 12 2 10 
7 11 11 1 12 2 9 11 10 10 
7 12 10 8 10 10 10 11 11 1 
7 11 12 8 11 11 11 1 11 11 
7 11 10 11 1 11 1...

output:

2 3 2 2 2 3 2 
0 2 3 3 2 2 2 
3 3 3 3 1 3 3 
2 2 2 2 2 4 2 
3 3 2 2 3 2 2 
3 3 3 1 3 4 1 
4 2 2 2 3 3 2 
3 1 3 2 2 3 3 
2 0 2 2 2 3 3 
0 3 3 3 3 3 3 
2 2 2 3 3 3 2 
2 0 2 2 2 2 2 
1 3 3 2 3 2 3 
3 3 2 3 3 2 3 
2 3 2 0 3 3 3 
2 2 2 2 2 2 2 
3 3 3 3 3 3 3 
2 2 2 2 2 2 2 
0 2 2 2 3 2 2 
1 3 3 2 2 2 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #206:

score: 100
Accepted
time: 2ms
memory: 3776kb

input:

300
7 10 10 9 9 5 10 10 9 12 
7 7 12 10 9 9 9 2 9 9 
7 8 2 1 12 11 11 11 11 11 
7 10 12 11 11 9 11 2 11 11 
7 11 7 2 12 11 3 8 11 11 
7 12 10 10 11 10 10 11 11 4 
7 10 11 1 12 9 9 10 10 11 
7 10 10 9 2 10 9 11 12 9 
7 1 9 9 9 12 9 11 11 9 
7 10 3 10 10 5 10 11 10 12 
7 12 11 11 11 11 11 8 11 3 
7 10...

output:

2 1 1 2 2 2 1 
2 4 1 1 1 1 1 
3 3 3 3 3 0 3 
3 2 1 3 3 3 3 
3 4 0 3 3 3 0 
2 2 3 2 2 3 3 
1 1 2 2 3 2 3 
1 3 2 1 2 2 1 
1 1 3 1 3 1 1 
3 2 2 2 3 2 2 
3 3 3 3 3 0 3 
2 2 2 2 2 2 2 
3 3 3 3 3 0 3 
0 3 2 2 3 3 2 
3 3 2 3 2 2 3 
3 0 1 2 2 0 3 
2 2 2 2 2 2 2 
2 2 2 2 2 2 2 
3 0 2 3 2 3 2 
3 2 2 2 2 2 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #207:

score: 100
Accepted
time: 0ms
memory: 3848kb

input:

300
7 11 1 11 11 11 12 11 11 11 
7 4 10 10 10 10 3 12 10 10 
7 5 10 10 1 12 10 10 10 10 
7 12 10 10 8 8 6 8 8 1 
7 10 2 10 10 10 2 12 10 10 
7 8 9 10 9 12 9 9 9 11 
7 11 12 11 11 11 9 2 11 11 
7 11 1 11 11 10 12 11 10 10 
7 12 10 10 10 10 10 10 10 3 
7 8 6 11 8 9 1 12 11 11 
7 11 1 11 6 11 12 9 9 11...

output:

3 3 3 3 3 3 3 
2 2 3 2 2 2 2 
2 3 2 2 2 2 2 
2 2 0 0 2 0 0 
2 2 2 3 2 2 2 
1 1 1 3 1 1 2 
3 3 3 1 3 3 3 
3 2 2 3 2 3 3 
2 2 2 2 2 2 2 
3 3 0 4 3 0 1 
2 3 3 1 1 3 3 
2 2 2 2 2 2 2 
2 3 3 3 3 3 2 
0 2 2 2 3 3 2 
2 2 2 2 2 2 2 
3 2 3 2 0 3 0 
3 3 3 3 3 3 3 
2 3 3 0 2 2 0 
1 1 1 1 1 3 1 
1 2 3 3 3 1 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #208:

score: 100
Accepted
time: 3ms
memory: 3712kb

input:

300
7 3 11 10 10 12 8 11 10 10 
7 10 10 10 10 10 8 12 10 10 
7 10 12 11 11 11 11 4 11 11 
7 10 3 10 10 8 10 10 10 12 
7 11 11 11 11 10 5 12 11 11 
7 1 10 10 10 12 10 9 10 10 
7 10 12 10 10 10 10 3 10 10 
7 10 8 10 5 10 5 3 12 10 
7 10 10 2 12 10 10 10 10 10 
7 10 10 10 3 10 10 9 12 10 
7 1 10 10 10 ...

output:

0 2 2 2 3 3 2 
2 2 2 2 2 2 2 
3 2 3 3 3 3 3 
2 2 2 2 3 2 2 
3 3 3 3 3 3 2 
2 2 2 2 1 2 2 
2 2 2 2 2 2 2 
2 4 0 2 2 2 2 
2 2 2 2 2 2 2 
2 1 2 2 2 2 2 
2 2 2 2 2 2 2 
3 2 2 2 2 2 3 
3 3 3 3 3 3 3 
2 2 2 2 2 2 4 
2 2 2 2 3 3 2 
3 2 3 3 3 3 2 
3 3 2 3 3 2 3 
2 2 3 2 3 3 3 
3 3 0 3 3 3 3 
2 2 2 2 2 2 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #209:

score: 100
Accepted
time: 2ms
memory: 3712kb

input:

300
7 11 12 11 10 10 11 5 11 11 
7 10 2 10 10 10 12 9 10 10 
7 11 11 1 12 11 11 11 11 11 
7 11 12 8 8 11 8 6 11 11 
7 10 10 12 11 11 11 11 5 11 
7 11 8 8 11 11 2 12 11 11 
7 11 1 11 10 10 12 11 10 11 
7 10 3 10 10 10 12 8 10 11 
7 9 2 10 10 9 12 7 11 9 
7 11 11 10 2 10 11 11 12 11 
7 10 12 10 8 10 1...

output:

3 3 2 3 2 3 3 
2 2 2 1 2 2 2 
3 3 3 3 3 3 3 
0 3 3 0 0 3 3 
2 2 3 3 3 3 3 
3 3 3 0 0 3 3 
2 2 3 3 2 3 3 
2 2 3 0 2 2 2 
2 1 1 2 3 2 1 
3 3 3 2 3 2 3 
2 2 2 2 0 2 2 
1 2 2 3 2 2 3 
3 3 3 3 3 3 3 
3 2 3 3 3 2 3 
3 0 3 3 3 0 3 
2 3 2 3 2 2 3 
3 3 3 3 3 3 2 
3 1 3 3 3 3 3 
2 2 3 3 2 2 2 
2 2 2 2 2 2 1 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #210:

score: 100
Accepted
time: 3ms
memory: 3972kb

input:

295
7 10 12 10 11 10 11 4 10 10 
7 5 10 10 8 12 8 8 11 11 
7 11 11 1 12 11 11 11 11 11 
7 10 10 11 10 10 1 12 10 8 
7 11 11 12 10 11 11 11 1 11 
7 10 10 11 11 1 10 9 11 12 
7 11 11 10 10 11 8 12 10 11 
7 1 10 10 10 12 10 10 10 10 
7 11 10 12 8 11 11 11 8 11 
7 10 9 8 12 10 9 10 11 11 
7 11 10 7 12 1...

output:

2 2 2 3 3 2 2 
0 0 3 3 0 2 2 
3 3 3 3 3 3 3 
2 0 2 2 3 2 2 
3 3 3 2 3 3 3 
1 3 3 2 2 2 3 
2 3 3 3 2 2 3 
2 2 2 2 2 2 2 
3 2 3 0 3 3 3 
2 1 2 3 3 2 1 
3 3 3 3 3 3 2 
0 0 0 0 0 0 0 
3 0 2 3 2 3 3 
3 3 3 3 2 2 3 
2 2 2 2 2 2 2 
3 3 2 3 1 3 2 
2 3 3 2 2 2 2 
3 3 3 3 3 3 0 
3 3 3 3 3 3 3 
2 2 0 2 0 2 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #211:

score: 100
Accepted
time: 2ms
memory: 3760kb

input:

295
7 10 10 12 10 10 10 10 2 10 
7 8 9 9 11 4 11 11 11 12 
7 12 11 10 11 10 11 11 11 2 
7 12 11 11 11 11 11 11 11 5 
7 10 9 8 10 4 11 10 11 12 
7 11 11 11 2 11 11 11 12 11 
7 9 11 10 8 10 10 11 12 10 
7 11 11 8 11 10 2 12 11 11 
7 9 11 3 12 11 11 11 11 11 
7 10 10 12 10 10 10 10 3 10 
7 10 12 11 11 ...

output:

2 2 2 2 2 2 2 
3 3 1 0 1 3 3 
3 2 3 2 3 3 3 
3 3 3 3 3 3 3 
2 3 0 2 1 3 2 
3 3 3 3 3 3 3 
2 3 3 2 1 2 2 
3 3 3 3 0 3 2 
3 3 3 3 3 1 3 
2 2 2 2 2 2 2 
3 2 1 3 3 4 2 
2 2 2 0 2 3 0 
2 2 2 2 2 2 2 
2 1 2 2 2 2 2 
3 3 3 3 3 3 3 
3 3 3 3 3 3 3 
2 1 2 3 3 3 3 
3 3 3 3 3 3 3 
3 3 2 3 3 1 1 
3 3 3 3 3 2 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #212:

score: 100
Accepted
time: 3ms
memory: 4008kb

input:

294
7 8 11 11 8 11 11 11 12 11 
7 10 10 10 11 1 10 10 11 12 
7 5 11 11 11 12 11 10 10 11 
7 10 12 10 8 9 11 8 11 11 
7 10 4 10 10 10 12 11 10 11 
7 10 10 10 3 10 10 10 12 11 
7 11 11 11 11 11 2 12 11 11 
7 10 10 8 12 10 10 10 9 10 
7 10 1 10 10 10 12 11 10 11 
7 10 9 10 1 10 11 10 12 11 
7 2 10 10 1...

output:

3 3 3 3 0 3 3 
2 3 2 2 2 2 3 
3 3 2 3 2 3 3 
2 2 1 3 0 3 3 
2 2 3 3 2 2 2 
3 2 2 2 2 2 2 
3 3 3 3 3 3 3 
2 2 2 1 2 2 2 
2 2 3 3 2 2 2 
3 2 1 2 2 2 3 
2 2 2 3 2 2 2 
2 2 2 2 2 2 2 
2 2 2 2 0 2 3 
3 2 3 3 3 2 2 
3 2 2 2 2 2 2 
3 2 2 2 2 2 2 
2 2 3 3 2 3 2 
1 1 2 1 1 2 1 
0 3 3 3 3 3 3 
3 3 3 3 3 3 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #213:

score: 100
Accepted
time: 2ms
memory: 3772kb

input:

294
7 12 9 8 11 11 2 11 11 7 
7 11 11 11 11 11 8 12 11 11 
7 11 12 10 10 10 9 1 10 11 
7 9 11 1 12 9 9 11 11 11 
7 11 1 9 11 11 12 9 10 10 
7 10 4 10 11 10 12 10 10 10 
7 11 12 11 11 10 10 8 10 10 
7 12 11 10 10 10 10 10 11 1 
7 10 11 11 11 11 3 12 10 11 
7 11 10 11 8 1 10 10 10 12 
7 9 9 12 11 9 9 ...

output:

1 0 3 3 3 3 3 
3 3 3 3 3 3 3 
2 3 2 1 2 2 3 
1 1 3 3 3 1 3 
3 3 2 1 2 1 3 
3 2 2 2 2 2 2 
3 3 2 2 3 2 2 
3 2 2 2 2 2 3 
2 3 2 3 3 3 3 
2 2 3 3 2 2 0 
1 1 1 3 1 3 3 
0 0 3 2 3 3 3 
3 0 3 3 3 2 3 
2 2 2 2 2 2 2 
2 2 0 0 2 0 3 
2 2 2 2 2 2 2 
3 3 3 2 1 3 3 
3 1 3 3 3 3 2 
3 3 3 3 3 3 3 
2 2 2 2 2 0 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #214:

score: 100
Accepted
time: 0ms
memory: 3712kb

input:

294
7 10 11 2 11 11 1 12 10 11 
7 11 10 10 1 10 10 10 12 10 
7 7 12 9 10 4 11 1 8 8 
7 10 1 10 10 9 12 10 10 10 
7 8 9 5 12 10 10 10 10 10 
7 11 12 10 11 11 11 3 11 10 
7 11 10 10 11 1 10 11 10 12 
7 10 8 11 9 11 12 11 10 11 
7 1 10 10 9 12 9 9 9 9 
7 10 12 10 10 10 10 4 11 11 
7 8 11 11 1 11 11 9 1...

output:

2 3 2 3 3 3 3 
2 2 2 2 3 2 2 
1 4 0 3 2 0 0 
2 1 2 2 2 2 2 
2 2 2 2 2 0 1 
2 3 3 3 3 3 2 
3 2 2 3 2 2 3 
1 3 3 3 2 3 2 
1 1 1 1 1 2 2 
2 2 2 2 2 3 3 
3 1 3 3 0 3 3 
2 2 2 2 2 2 2 
3 3 0 2 3 2 2 
3 2 2 3 2 2 3 
1 3 1 3 2 3 2 
3 2 3 3 3 3 3 
2 2 2 1 2 2 2 
3 3 3 3 3 3 3 
2 3 3 2 1 3 3 
1 3 3 2 2 1 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #215:

score: 100
Accepted
time: 3ms
memory: 3764kb

input:

294
7 9 11 12 11 11 10 10 1 11 
7 12 10 10 7 10 10 10 6 2 
7 8 10 5 7 3 1 12 11 2 
7 10 12 10 10 11 10 8 10 10 
7 11 11 11 2 11 8 11 12 8 
7 10 10 10 10 10 4 12 9 10 
7 2 10 10 9 12 10 10 10 10 
7 11 8 11 11 11 12 11 11 11 
7 10 4 10 10 10 12 10 10 10 
7 12 11 11 10 10 10 10 10 1 
7 11 12 11 11 11 1...

output:

1 3 2 3 3 3 2 
2 2 2 2 2 2 2 
3 0 0 2 4 2 1 
2 2 3 2 2 2 2 
0 3 3 3 3 3 0 
1 2 2 2 2 2 2 
2 1 2 2 2 2 2 
3 3 3 3 3 3 3 
2 2 2 2 2 2 2 
3 3 2 2 2 2 2 
3 3 3 2 3 2 2 
2 2 3 3 3 1 2 
2 2 2 2 2 2 2 
2 3 3 3 3 3 4 
2 2 2 1 3 2 2 
2 2 2 2 2 2 2 
3 3 3 3 3 3 3 
2 2 2 3 0 2 2 
2 2 2 2 0 2 2 
1 1 2 1 2 3 1 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #216:

score: 100
Accepted
time: 2ms
memory: 3848kb

input:

294
7 11 11 5 12 11 10 11 11 10 
7 10 11 10 2 11 11 11 12 8 
7 10 10 10 10 11 2 12 10 8 
7 11 11 12 8 9 11 11 2 10 
7 10 11 10 11 10 5 12 11 10 
7 8 3 10 10 10 12 10 10 10 
7 9 12 10 10 11 10 1 10 11 
7 11 1 9 11 11 12 11 11 8 
7 9 3 8 11 11 12 11 11 10 
7 10 11 11 2 9 8 11 12 11 
7 10 12 10 10 10 1...

output:

3 2 3 3 2 3 3 
0 3 3 2 2 3 3 
2 0 2 2 2 2 3 
3 3 3 0 1 2 3 
3 2 2 3 2 3 2 
2 2 2 2 2 2 0 
2 1 3 2 2 2 3 
3 3 0 3 3 1 3 
3 3 2 3 3 0 1 
3 3 3 3 2 1 0 
2 2 2 3 2 3 0 
3 2 3 3 3 3 1 
3 3 3 3 3 3 3 
2 1 1 1 1 1 1 
3 2 2 2 2 2 2 
1 3 3 2 2 3 2 
2 3 3 2 2 2 3 
3 2 2 2 2 2 2 
2 3 2 2 2 3 2 
2 2 2 2 2 2 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #217:

score: 100
Accepted
time: 2ms
memory: 4008kb

input:

294
7 9 6 9 11 11 12 11 11 11 
7 10 10 10 1 10 10 10 12 10 
7 8 3 10 10 8 12 10 10 10 
7 10 1 10 10 10 12 11 10 1 
7 10 6 10 4 10 5 12 6 9 
7 11 10 12 10 11 10 11 3 11 
7 11 4 10 10 8 12 10 11 10 
7 4 10 11 10 12 11 11 11 11 
7 12 10 10 10 8 10 8 8 3 
7 11 11 11 4 11 11 11 12 11 
7 10 11 10 10 10 2 ...

output:

3 3 3 3 3 1 1 
2 2 2 2 2 2 2 
2 0 2 2 2 2 0 
2 2 0 3 2 2 2 
2 1 2 4 2 1 2 
3 2 2 2 3 3 3 
2 0 2 2 3 2 3 
3 2 3 3 3 2 3 
2 2 2 0 2 0 0 
3 3 3 3 3 3 3 
2 2 2 3 2 2 2 
3 3 3 3 2 3 3 
3 2 3 3 3 3 1 
3 3 2 1 3 3 0 
2 2 3 3 1 2 3 
3 1 2 2 2 2 0 
3 2 2 2 3 3 2 
3 3 3 3 3 3 3 
2 2 1 3 3 3 3 
2 3 1 1 0 2 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #218:

score: 100
Accepted
time: 3ms
memory: 3736kb

input:

294
7 11 11 8 9 11 1 12 11 11 
7 10 5 10 10 11 12 11 10 10 
7 10 10 10 10 10 3 12 10 11 
7 10 1 10 10 10 12 10 10 10 
7 8 11 11 11 12 10 11 11 11 
7 11 10 10 10 11 2 12 10 10 
7 10 10 10 10 8 11 11 10 12 
7 11 12 10 10 11 10 8 10 10 
7 8 11 11 10 12 11 10 11 11 
7 10 10 10 10 3 10 10 10 12 
7 10 11 ...

output:

3 3 3 3 0 1 3 
2 3 2 3 2 2 2 
2 3 2 2 2 2 2 
2 2 2 2 2 2 2 
2 3 3 3 3 3 3 
2 2 3 2 2 2 3 
3 2 2 2 2 3 2 
2 3 3 2 2 2 2 
3 2 3 3 2 3 3 
2 2 2 2 2 2 2 
2 2 2 1 3 2 3 
3 2 3 2 3 2 2 
3 3 3 3 3 2 3 
3 3 3 0 2 3 3 
1 2 3 1 1 2 1 
3 1 3 3 3 3 3 
3 3 3 3 3 3 3 
3 3 3 3 3 3 3 
2 2 2 2 2 2 2 
2 1 2 2 2 3 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #219:

score: 100
Accepted
time: 2ms
memory: 4004kb

input:

294
7 12 10 10 10 10 10 10 10 6 
7 11 11 11 3 11 11 8 12 10 
7 12 10 10 10 10 10 10 10 4 
7 8 10 8 8 4 10 10 10 12 
7 12 3 9 4 5 1 11 2 1 
7 11 3 11 11 11 12 11 11 9 
7 10 10 11 2 10 10 10 12 10 
7 11 12 10 11 11 10 1 11 11 
7 11 11 10 2 11 11 11 12 11 
7 10 2 10 11 10 12 11 10 11 
7 10 12 11 10 11 ...

output:

2 2 2 2 2 2 2 
2 0 3 3 3 3 3 
2 2 2 2 2 2 2 
2 2 0 0 2 2 0 
3 1 4 2 3 3 0 
3 3 1 3 3 3 3 
2 2 2 3 2 2 2 
2 3 3 2 3 3 3 
3 3 3 2 3 3 3 
3 2 3 3 2 2 2 
3 2 3 2 2 2 2 
1 0 2 1 3 0 3 
3 3 2 2 3 3 3 
3 3 3 3 3 3 3 
2 2 2 2 2 3 2 
1 3 3 1 3 4 1 
3 3 3 3 3 3 3 
2 2 2 2 2 2 2 
2 2 2 2 2 2 0 
3 3 2 3 3 3 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #220:

score: 100
Accepted
time: 0ms
memory: 3732kb

input:

294
7 12 10 10 11 11 11 10 6 3 
7 10 8 1 12 11 10 10 9 10 
7 11 10 12 10 10 9 9 3 10 
7 10 10 12 10 10 10 10 2 10 
7 10 8 8 12 11 10 8 10 11 
7 8 11 12 11 11 8 10 2 11 
7 4 11 8 10 12 8 11 11 11 
7 10 12 11 11 11 10 1 11 8 
7 12 10 10 10 10 10 10 10 2 
7 10 11 12 10 11 11 11 8 10 
7 10 10 10 10 10 3...

output:

2 2 3 3 3 2 2 
3 2 2 1 2 2 0 
3 2 1 2 2 2 1 
2 2 2 2 2 2 2 
3 2 0 2 3 2 0 
0 3 0 3 3 3 2 
0 2 3 3 3 3 0 
3 2 3 2 3 3 0 
2 2 2 2 2 2 2 
2 3 3 2 3 2 3 
2 2 2 2 2 2 2 
2 2 2 2 2 3 2 
3 2 2 3 2 2 3 
2 2 2 2 2 2 2 
2 2 2 2 2 2 2 
2 2 2 2 2 2 2 
3 3 3 3 3 3 3 
2 2 2 2 2 2 1 
3 3 3 3 3 3 1 
3 0 3 3 3 3 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #221:

score: 100
Accepted
time: 3ms
memory: 3932kb

input:

294
7 10 10 12 10 10 10 8 5 10 
7 11 11 11 11 1 11 11 11 12 
7 10 11 10 11 8 1 12 10 10 
7 10 10 10 10 10 8 12 10 9 
7 12 11 11 11 11 11 11 11 2 
7 10 12 10 10 10 10 3 10 10 
7 12 11 10 10 10 10 10 10 1 
7 10 10 10 3 10 10 10 12 10 
7 11 10 11 1 10 10 10 12 11 
7 10 11 11 11 11 3 12 9 9 
7 11 12 11 ...

output:

2 2 2 2 2 2 0 
3 3 3 3 3 3 3 
2 2 2 3 2 3 0 
2 1 2 2 2 2 2 
3 3 3 3 3 3 3 
2 2 2 2 2 2 2 
3 2 2 2 2 2 2 
2 2 2 2 2 2 2 
3 2 2 3 3 2 2 
1 1 2 3 3 3 3 
3 3 3 3 3 3 3 
3 3 3 3 3 2 3 
2 2 2 2 2 2 2 
3 3 3 2 3 3 3 
3 3 3 3 3 3 3 
4 2 2 2 2 3 2 
2 2 3 3 2 1 2 
2 2 2 2 3 2 2 
2 2 1 2 3 3 2 
1 1 3 1 3 1 1 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #222:

score: 100
Accepted
time: 2ms
memory: 4008kb

input:

294
7 11 5 6 12 10 10 11 10 8 
7 11 11 12 11 11 11 11 1 11 
7 12 8 8 8 11 8 11 11 3 
7 12 11 11 11 11 11 11 11 8 
7 11 11 11 11 11 1 12 11 11 
7 11 10 11 8 10 9 11 12 11 
7 10 12 11 11 11 11 1 11 9 
7 9 9 12 11 11 10 10 7 10 
7 11 11 11 4 10 11 10 12 11 
7 1 11 11 11 12 11 11 11 11 
7 10 10 10 10 2 ...

output:

2 2 3 2 0 3 3 
3 3 3 3 3 3 3 
0 0 0 3 0 3 3 
3 3 3 3 3 3 3 
3 3 3 3 3 3 3 
3 3 2 3 3 2 1 
3 2 3 3 3 3 1 
1 1 2 3 3 2 2 
3 2 3 3 3 2 3 
3 3 3 3 3 3 3 
2 2 2 2 2 2 2 
3 3 3 3 3 3 3 
3 3 0 3 3 3 3 
2 3 3 3 2 1 2 
3 3 3 3 2 3 3 
3 3 3 3 2 3 2 
3 2 2 2 2 3 3 
3 3 3 3 3 3 3 
2 3 3 2 2 3 2 
3 3 2 2 2 2 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #223:

score: 100
Accepted
time: 0ms
memory: 3712kb

input:

294
7 11 11 11 8 10 10 11 12 11 
7 10 12 10 9 9 8 6 11 11 
7 11 11 10 10 2 10 10 10 12 
7 11 8 8 11 1 11 11 11 12 
7 10 10 12 10 10 10 10 8 10 
7 9 11 2 12 10 10 10 10 10 
7 10 10 10 10 10 3 12 10 10 
7 10 11 2 12 10 11 11 9 10 
7 10 10 11 5 11 3 11 12 11 
7 10 12 10 11 11 10 8 11 11 
7 9 9 11 9 9 4...

output:

3 3 3 3 3 2 2 
2 2 1 0 1 3 3 
2 2 2 3 3 2 2 
3 3 0 3 0 3 3 
2 2 2 2 2 2 2 
2 2 2 2 2 1 3 
2 2 2 2 2 2 2 
2 3 3 1 2 2 3 
3 3 2 3 2 3 3 
2 2 3 2 3 3 3 
1 3 1 1 3 1 1 
3 3 2 3 2 3 3 
2 3 2 2 2 2 2 
0 1 2 2 0 2 0 
3 3 3 3 3 3 2 
1 1 1 0 0 2 2 
4 3 3 3 3 3 3 
3 3 2 3 3 3 3 
3 2 2 1 2 3 2 
2 2 2 2 3 3 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #224:

score: 100
Accepted
time: 1ms
memory: 3788kb

input:

294
7 12 11 11 11 11 11 11 11 1 
7 11 2 11 8 11 12 11 11 11 
7 1 11 11 11 12 11 11 11 11 
7 10 12 10 10 10 10 1 11 11 
7 11 10 1 12 10 10 10 10 10 
7 9 11 10 1 10 11 11 12 10 
7 10 8 11 10 4 11 11 10 12 
7 11 9 12 10 10 11 11 8 10 
7 12 11 11 10 11 10 11 11 7 
7 11 11 12 11 11 11 11 4 11 
7 9 9 1 12...

output:

3 3 3 3 3 3 3 
0 3 3 3 3 3 3 
3 3 3 3 3 3 3 
2 2 2 2 2 3 3 
2 2 2 2 2 3 2 
2 3 3 2 1 2 3 
3 2 3 2 0 3 2 
3 1 3 2 2 2 3 
3 3 2 3 2 3 3 
3 3 3 3 3 3 3 
1 1 3 3 3 1 1 
2 2 2 2 1 2 2 
2 2 1 2 2 2 2 
3 3 3 2 3 0 2 
2 3 0 2 3 2 2 
2 3 3 3 1 3 3 
3 2 2 2 2 3 2 
2 2 3 2 2 2 3 
3 3 3 3 3 2 3 
2 3 0 1 2 4 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #225:

score: 100
Accepted
time: 2ms
memory: 3760kb

input:

294
7 11 11 1 12 10 10 8 10 10 
7 11 10 11 8 11 8 11 12 10 
7 10 10 2 12 10 10 10 10 10 
7 11 10 10 2 10 9 11 12 10 
7 10 2 11 11 10 12 11 11 11 
7 10 12 10 10 10 11 1 10 11 
7 12 10 10 11 10 10 10 10 1 
7 11 11 11 10 8 1 12 11 11 
7 11 11 11 8 8 11 10 11 12 
7 10 10 11 10 1 10 10 10 12 
7 10 11 10 ...

output:

2 2 0 2 2 3 3 
2 3 2 3 3 3 0 
2 2 2 2 2 2 2 
2 3 2 2 3 2 1 
3 2 3 3 3 3 2 
2 2 2 3 2 2 3 
2 2 3 2 2 2 2 
3 3 3 3 3 2 0 
2 3 3 3 3 3 0 
2 2 3 2 2 2 2 
3 3 2 3 2 2 1 
2 2 2 2 2 2 2 
3 3 2 1 3 3 3 
2 3 2 3 2 1 2 
2 2 3 2 1 2 2 
2 2 2 2 3 2 2 
3 3 3 3 3 3 3 
2 3 3 3 3 2 3 
3 3 0 3 3 3 3 
2 0 2 2 2 2 2 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Test #226:

score: 100
Accepted
time: 3ms
memory: 3716kb

input:

294
7 10 11 1 12 11 11 11 11 8 
7 10 5 10 10 10 12 10 10 10 
7 11 11 11 9 1 11 11 11 12 
7 8 11 1 12 11 11 11 10 10 
7 2 5 9 6 12 9 8 9 1 
7 11 12 11 11 11 11 4 11 11 
7 10 11 11 10 10 8 12 11 11 
7 10 10 1 12 10 10 9 10 11 
7 10 9 11 8 10 10 11 12 9 
7 5 10 10 11 12 11 11 10 8 
7 11 11 11 11 11 1 1...

output:

3 3 3 3 0 2 3 
2 2 2 2 2 2 2 
3 3 3 3 3 3 1 
3 3 3 2 2 0 3 
1 2 1 4 0 1 1 
3 3 3 3 3 3 3 
3 3 2 3 3 2 2 
2 2 1 2 3 2 2 
1 3 1 3 2 2 2 
3 3 2 0 3 2 2 
3 2 3 3 3 3 3 
2 2 1 2 2 1 1 
3 2 2 2 1 2 2 
2 2 2 1 2 2 3 
2 2 2 1 2 2 1 
2 2 2 2 0 2 2 
3 3 3 2 2 3 2 
3 3 2 1 3 3 3 
3 2 3 3 2 1 2 
3 3 3 2 2 3 3 
...

input:


output:

Accepted: Maximum value = 12

result:

points 1.0

Extra Test:

score: 0
Extra Test Passed