QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#227820#7636. Fair Electionsucup-team1878#AC ✓2400ms5296kbC++202.5kb2023-10-28 00:24:552023-10-28 00:24:56

詳細信息

Test #1:

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

input:

3
3 2 1
1 2 3
2 1 3

output:

2

result:

ok 1 number(s): "2"

Test #2:

score: 0
Accepted
time: 0ms
memory: 3456kb

input:

5
1 2 3
2 3 1
1 3 2
3 1 2
2 1 3

output:

1

result:

ok 1 number(s): "1"

Test #3:

score: 0
Accepted
time: 0ms
memory: 3488kb

input:

5
1 2 3
3 2 1
1 2 3
1 2 3
3 2 1

output:

1

result:

ok 1 number(s): "1"

Test #4:

score: 0
Accepted
time: 1ms
memory: 3396kb

input:

5
3 2 1
3 1 2
2 3 1
1 2 3
2 1 3

output:

2

result:

ok 1 number(s): "2"

Test #5:

score: 0
Accepted
time: 0ms
memory: 3412kb

input:

5
3 2 1
3 2 1
1 3 2
1 3 2
3 2 1

output:

3

result:

ok 1 number(s): "3"

Test #6:

score: 0
Accepted
time: 0ms
memory: 3420kb

input:

5
3 2 1
3 1 2
1 2 3
1 3 2
1 3 2

output:

1

result:

ok 1 number(s): "1"

Test #7:

score: 0
Accepted
time: 0ms
memory: 3496kb

input:

20
1 2 3
2 3 1
1 3 2
3 1 2
2 1 3
1 2 3
3 2 1
1 2 3
1 2 3
3 2 1
3 2 1
3 1 2
2 3 1
1 2 3
2 1 3
3 2 1
3 2 1
1 3 2
1 3 2
3 2 1

output:

1

result:

ok 1 number(s): "1"

Test #8:

score: 0
Accepted
time: 0ms
memory: 3440kb

input:

20
3 2 1
3 1 2
1 2 3
1 3 2
1 3 2
1 2 3
3 1 2
1 3 2
3 2 1
1 3 2
2 1 3
3 1 2
2 3 1
2 1 3
2 3 1
3 1 2
3 1 2
2 1 3
3 1 2
1 2 3

output:

1

result:

ok 1 number(s): "1"

Test #9:

score: 0
Accepted
time: 0ms
memory: 3432kb

input:

20
1 2 3
2 3 1
2 1 3
2 1 3
1 3 2
3 1 2
2 3 1
1 3 2
3 1 2
1 2 3
1 2 3
3 2 1
3 1 2
1 2 3
3 2 1
1 2 3
2 3 1
3 1 2
3 2 1
3 2 1

output:

3

result:

ok 1 number(s): "3"

Test #10:

score: 0
Accepted
time: 0ms
memory: 3472kb

input:

20
3 1 2
3 2 1
1 2 3
1 3 2
1 3 2
2 3 1
1 3 2
2 3 1
1 2 3
3 2 1
1 2 3
3 2 1
1 2 3
1 2 3
3 2 1
2 3 1
2 3 1
1 2 3
2 1 3
2 1 3

output:

1

result:

ok 1 number(s): "1"

Test #11:

score: 0
Accepted
time: 1ms
memory: 3460kb

input:

20
2 1 3
2 1 3
3 1 2
3 2 1
2 1 3
1 2 3
2 3 1
3 1 2
3 1 2
2 3 1
3 2 1
1 3 2
2 1 3
2 1 3
1 2 3
2 3 1
2 3 1
3 2 1
2 1 3
1 3 2

output:

2

result:

ok 1 number(s): "2"

Test #12:

score: 0
Accepted
time: 2325ms
memory: 5208kb

input:

10000
1 2 3
2 3 1
1 3 2
3 1 2
2 1 3
1 2 3
3 2 1
1 2 3
1 2 3
3 2 1
3 2 1
3 1 2
2 3 1
1 2 3
2 1 3
3 2 1
3 2 1
1 3 2
1 3 2
3 2 1
3 2 1
3 1 2
1 2 3
1 3 2
1 3 2
1 2 3
3 1 2
1 3 2
3 2 1
1 3 2
2 1 3
3 1 2
2 3 1
2 1 3
2 3 1
3 1 2
3 1 2
2 1 3
3 1 2
1 2 3
1 2 3
2 3 1
2 1 3
2 1 3
1 3 2
3 1 2
2 3 1
1 3 2
3 1 2
...

output:

3

result:

ok 1 number(s): "3"

Test #13:

score: 0
Accepted
time: 2311ms
memory: 5240kb

input:

10000
2 1 3
1 3 2
3 2 1
3 1 2
1 3 2
2 1 3
2 3 1
1 3 2
1 3 2
2 1 3
3 2 1
3 1 2
3 1 2
3 1 2
2 3 1
1 2 3
3 2 1
2 1 3
3 2 1
3 1 2
2 1 3
1 2 3
2 1 3
2 1 3
2 1 3
2 1 3
2 3 1
2 3 1
3 2 1
3 2 1
3 1 2
3 2 1
1 2 3
1 2 3
1 2 3
2 3 1
1 3 2
1 2 3
2 3 1
1 3 2
2 1 3
2 3 1
2 3 1
3 1 2
1 3 2
3 1 2
3 2 1
1 2 3
1 3 2
...

output:

3

result:

ok 1 number(s): "3"

Test #14:

score: 0
Accepted
time: 2272ms
memory: 5128kb

input:

10000
3 2 1
3 1 2
3 2 1
3 2 1
3 1 2
1 3 2
3 1 2
1 3 2
2 3 1
1 3 2
3 1 2
3 2 1
3 1 2
1 2 3
3 2 1
3 1 2
3 1 2
1 2 3
2 3 1
3 1 2
3 2 1
3 2 1
3 2 1
2 3 1
3 1 2
3 1 2
1 2 3
3 2 1
3 1 2
3 1 2
1 2 3
2 3 1
3 1 2
2 1 3
1 2 3
2 3 1
2 3 1
1 2 3
3 1 2
2 1 3
1 3 2
1 2 3
1 2 3
1 2 3
1 3 2
3 1 2
1 2 3
2 1 3
3 2 1
...

output:

1

result:

ok 1 number(s): "1"

Test #15:

score: 0
Accepted
time: 2400ms
memory: 5184kb

input:

10000
1 2 3
3 2 1
2 1 3
2 1 3
2 1 3
1 3 2
3 2 1
1 2 3
3 2 1
2 3 1
1 2 3
1 3 2
2 1 3
3 1 2
1 2 3
2 3 1
1 2 3
2 1 3
2 1 3
2 3 1
2 3 1
2 1 3
1 3 2
1 2 3
2 1 3
1 2 3
1 3 2
2 3 1
1 2 3
2 3 1
1 3 2
1 2 3
2 3 1
3 1 2
2 3 1
3 1 2
3 1 2
2 1 3
3 2 1
3 2 1
3 2 1
3 1 2
2 1 3
1 2 3
3 1 2
2 3 1
2 1 3
3 2 1
2 3 1
...

output:

2

result:

ok 1 number(s): "2"

Test #16:

score: 0
Accepted
time: 2313ms
memory: 5236kb

input:

10000
1 2 3
3 1 2
3 2 1
1 2 3
2 3 1
3 1 2
3 1 2
3 1 2
2 1 3
2 1 3
3 1 2
3 2 1
2 1 3
1 3 2
1 3 2
1 2 3
2 1 3
1 3 2
2 1 3
1 3 2
1 3 2
1 3 2
1 3 2
1 3 2
1 3 2
1 3 2
2 3 1
1 2 3
2 1 3
1 2 3
1 3 2
1 2 3
2 3 1
1 2 3
3 2 1
2 1 3
2 3 1
2 1 3
1 2 3
1 2 3
2 1 3
1 3 2
3 2 1
3 2 1
3 2 1
1 2 3
3 2 1
3 2 1
3 1 2
...

output:

2

result:

ok 1 number(s): "2"

Test #17:

score: 0
Accepted
time: 2282ms
memory: 5112kb

input:

10000
2 1 3
1 3 2
3 2 1
2 1 3
1 3 2
3 1 2
1 2 3
3 2 1
2 3 1
1 2 3
2 1 3
1 2 3
1 3 2
3 2 1
1 2 3
2 1 3
2 1 3
2 1 3
3 2 1
2 3 1
1 2 3
2 3 1
3 1 2
3 2 1
1 3 2
1 2 3
1 3 2
3 1 2
2 3 1
3 2 1
2 3 1
3 1 2
3 2 1
2 1 3
3 1 2
3 1 2
3 2 1
1 3 2
3 1 2
2 3 1
2 3 1
1 3 2
2 1 3
3 1 2
3 2 1
1 3 2
1 3 2
2 1 3
2 1 3
...

output:

1

result:

ok 1 number(s): "1"

Test #18:

score: 0
Accepted
time: 2314ms
memory: 5076kb

input:

10000
3 1 2
2 3 1
3 2 1
2 3 1
2 1 3
3 1 2
2 1 3
3 1 2
3 2 1
3 2 1
3 2 1
1 2 3
2 3 1
2 3 1
3 1 2
3 1 2
2 1 3
2 1 3
3 2 1
1 2 3
3 2 1
3 1 2
1 2 3
3 1 2
1 3 2
2 3 1
1 2 3
1 3 2
2 1 3
2 3 1
1 3 2
1 3 2
2 3 1
2 3 1
3 1 2
2 3 1
3 1 2
2 3 1
2 1 3
3 1 2
1 2 3
1 2 3
1 2 3
1 2 3
2 3 1
1 2 3
3 1 2
2 1 3
2 1 3
...

output:

1

result:

ok 1 number(s): "1"

Test #19:

score: 0
Accepted
time: 2264ms
memory: 5240kb

input:

10000
3 2 1
1 2 3
3 2 1
3 1 2
3 1 2
2 3 1
1 2 3
1 3 2
1 3 2
2 3 1
1 3 2
1 3 2
1 2 3
3 2 1
3 1 2
2 1 3
2 1 3
2 1 3
2 3 1
3 1 2
1 3 2
3 2 1
3 2 1
3 2 1
2 3 1
1 2 3
2 3 1
1 2 3
1 3 2
1 3 2
3 1 2
1 2 3
2 3 1
1 2 3
3 2 1
2 1 3
2 3 1
2 1 3
1 3 2
3 1 2
3 1 2
3 1 2
3 1 2
3 1 2
3 1 2
3 1 2
3 2 1
3 2 1
3 1 2
...

output:

3

result:

ok 1 number(s): "3"

Test #20:

score: 0
Accepted
time: 2314ms
memory: 5124kb

input:

10000
3 1 2
1 2 3
1 2 3
2 3 1
3 1 2
1 2 3
2 3 1
3 2 1
1 2 3
3 2 1
3 2 1
3 2 1
3 1 2
1 3 2
2 1 3
3 1 2
3 2 1
3 1 2
2 3 1
3 1 2
1 2 3
3 1 2
2 1 3
1 2 3
3 1 2
1 2 3
1 3 2
3 2 1
2 1 3
3 2 1
2 3 1
3 1 2
2 3 1
1 2 3
1 3 2
3 2 1
3 1 2
1 2 3
3 1 2
3 1 2
3 1 2
2 3 1
2 3 1
3 2 1
2 1 3
2 3 1
2 1 3
1 2 3
2 3 1
...

output:

3

result:

ok 1 number(s): "3"

Test #21:

score: 0
Accepted
time: 2367ms
memory: 5076kb

input:

10000
2 1 3
1 3 2
3 1 2
3 2 1
3 1 2
2 3 1
2 3 1
1 2 3
2 1 3
1 3 2
1 2 3
1 3 2
3 2 1
3 2 1
3 1 2
2 1 3
2 3 1
2 3 1
3 2 1
1 3 2
2 1 3
3 2 1
3 2 1
2 3 1
2 1 3
3 2 1
1 3 2
3 2 1
1 3 2
1 2 3
3 1 2
2 3 1
3 1 2
2 1 3
1 3 2
3 2 1
1 3 2
3 2 1
1 3 2
3 2 1
2 3 1
1 3 2
3 1 2
3 2 1
3 1 2
3 1 2
1 2 3
2 3 1
3 2 1
...

output:

1

result:

ok 1 number(s): "1"

Test #22:

score: 0
Accepted
time: 2287ms
memory: 5268kb

input:

10000
3 2 1
3 1 2
3 2 1
2 1 3
3 2 1
1 3 2
3 2 1
2 1 3
1 3 2
1 3 2
1 3 2
2 3 1
3 1 2
3 2 1
2 3 1
2 1 3
1 2 3
1 3 2
1 2 3
1 2 3
1 3 2
2 1 3
1 2 3
2 3 1
2 1 3
2 1 3
2 1 3
3 1 2
1 2 3
3 1 2
2 3 1
3 1 2
1 3 2
1 3 2
3 2 1
2 1 3
2 1 3
3 1 2
3 2 1
3 2 1
3 2 1
3 1 2
3 2 1
2 1 3
3 1 2
2 1 3
1 3 2
3 1 2
1 2 3
...

output:

1

result:

ok 1 number(s): "1"

Test #23:

score: 0
Accepted
time: 2278ms
memory: 5112kb

input:

10000
2 3 1
2 1 3
2 3 1
2 3 1
3 2 1
2 3 1
1 2 3
2 3 1
1 2 3
3 1 2
1 2 3
1 3 2
3 1 2
3 2 1
3 2 1
3 1 2
1 2 3
3 2 1
2 3 1
2 3 1
1 3 2
1 3 2
2 1 3
3 1 2
2 3 1
2 3 1
2 3 1
1 3 2
1 3 2
1 3 2
2 3 1
3 1 2
2 1 3
2 3 1
3 2 1
3 2 1
2 3 1
1 2 3
2 1 3
2 3 1
1 2 3
2 3 1
1 2 3
1 3 2
3 2 1
3 2 1
1 2 3
3 2 1
3 1 2
...

output:

1

result:

ok 1 number(s): "1"

Test #24:

score: 0
Accepted
time: 2303ms
memory: 5136kb

input:

10000
1 3 2
2 1 3
2 1 3
3 2 1
1 2 3
3 1 2
3 1 2
3 1 2
3 1 2
1 2 3
2 1 3
1 3 2
3 2 1
3 1 2
1 3 2
1 2 3
1 3 2
2 3 1
3 1 2
3 2 1
1 2 3
3 2 1
3 2 1
1 3 2
1 2 3
3 2 1
2 3 1
3 2 1
2 3 1
3 2 1
1 2 3
1 3 2
2 3 1
3 1 2
2 3 1
2 3 1
1 3 2
3 1 2
2 3 1
3 2 1
2 1 3
2 3 1
1 3 2
3 2 1
2 3 1
2 3 1
1 2 3
2 1 3
2 1 3
...

output:

3

result:

ok 1 number(s): "3"

Test #25:

score: 0
Accepted
time: 2333ms
memory: 5108kb

input:

10000
2 1 3
2 3 1
3 2 1
1 2 3
3 1 2
2 1 3
2 3 1
1 3 2
1 2 3
2 3 1
3 1 2
3 2 1
1 2 3
2 3 1
3 1 2
3 1 2
2 3 1
1 2 3
1 2 3
3 1 2
2 3 1
2 1 3
1 3 2
1 3 2
2 3 1
1 2 3
2 3 1
2 1 3
3 2 1
1 2 3
1 2 3
1 2 3
1 3 2
2 1 3
1 2 3
1 3 2
1 2 3
1 2 3
3 2 1
2 1 3
2 1 3
1 3 2
1 3 2
1 2 3
3 2 1
2 1 3
3 1 2
1 3 2
1 3 2
...

output:

1

result:

ok 1 number(s): "1"

Test #26:

score: 0
Accepted
time: 2269ms
memory: 5200kb

input:

10000
2 1 3
3 1 2
1 2 3
2 1 3
3 1 2
1 3 2
2 1 3
3 2 1
3 1 2
1 3 2
1 3 2
3 2 1
2 1 3
1 2 3
3 1 2
1 2 3
2 1 3
1 3 2
1 2 3
2 3 1
3 1 2
2 1 3
2 3 1
2 1 3
2 3 1
3 2 1
2 3 1
1 3 2
1 2 3
3 1 2
2 3 1
1 2 3
1 3 2
3 2 1
3 1 2
2 1 3
3 2 1
1 2 3
1 3 2
2 3 1
3 1 2
1 2 3
3 1 2
1 3 2
3 1 2
2 1 3
2 1 3
1 3 2
2 3 1
...

output:

3

result:

ok 1 number(s): "3"

Test #27:

score: 0
Accepted
time: 2303ms
memory: 5208kb

input:

10000
3 2 1
2 1 3
1 2 3
1 3 2
3 2 1
3 2 1
1 3 2
3 1 2
1 3 2
3 2 1
1 3 2
1 3 2
3 2 1
1 2 3
3 2 1
1 3 2
3 2 1
3 2 1
2 1 3
2 3 1
3 2 1
3 1 2
1 3 2
3 2 1
3 2 1
3 1 2
1 2 3
2 3 1
3 2 1
3 1 2
1 3 2
3 2 1
1 3 2
1 3 2
3 1 2
3 2 1
2 1 3
1 3 2
3 2 1
2 3 1
1 2 3
1 3 2
2 1 3
1 3 2
1 2 3
2 1 3
2 1 3
3 2 1
3 2 1
...

output:

2

result:

ok 1 number(s): "2"

Test #28:

score: 0
Accepted
time: 2298ms
memory: 5128kb

input:

10000
1 3 2
1 3 2
2 3 1
2 3 1
1 3 2
2 1 3
2 1 3
2 1 3
3 1 2
2 1 3
2 3 1
3 2 1
3 2 1
3 1 2
1 3 2
1 3 2
2 1 3
3 2 1
1 3 2
2 1 3
3 1 2
1 2 3
2 1 3
1 3 2
2 1 3
3 1 2
2 3 1
1 2 3
3 2 1
3 2 1
1 3 2
1 2 3
3 2 1
1 2 3
1 3 2
3 1 2
2 1 3
2 1 3
3 2 1
1 2 3
3 2 1
2 3 1
2 3 1
1 3 2
3 1 2
1 3 2
3 2 1
2 3 1
1 3 2
...

output:

3

result:

ok 1 number(s): "3"

Test #29:

score: 0
Accepted
time: 2302ms
memory: 5188kb

input:

10000
2 1 3
3 1 2
3 1 2
1 2 3
1 3 2
3 1 2
2 3 1
2 3 1
1 3 2
1 2 3
3 2 1
3 2 1
1 2 3
2 3 1
2 3 1
3 2 1
3 2 1
3 2 1
3 2 1
3 1 2
3 1 2
2 3 1
3 1 2
3 1 2
1 2 3
3 1 2
3 2 1
3 1 2
1 2 3
1 3 2
1 3 2
2 3 1
1 3 2
2 3 1
2 3 1
2 3 1
1 3 2
2 1 3
1 3 2
3 1 2
3 1 2
1 3 2
1 2 3
1 3 2
1 2 3
3 1 2
3 2 1
3 2 1
3 2 1
...

output:

2

result:

ok 1 number(s): "2"

Test #30:

score: 0
Accepted
time: 2288ms
memory: 5076kb

input:

10000
1 2 3
2 3 1
2 3 1
1 2 3
2 3 1
1 2 3
3 1 2
3 2 1
1 3 2
2 1 3
2 1 3
1 2 3
2 3 1
3 1 2
1 2 3
3 1 2
1 3 2
1 3 2
1 3 2
2 3 1
1 3 2
1 3 2
1 2 3
3 2 1
3 1 2
3 2 1
1 3 2
2 3 1
3 1 2
1 3 2
1 3 2
2 1 3
3 1 2
2 1 3
2 3 1
3 1 2
2 3 1
3 2 1
1 3 2
3 1 2
3 1 2
3 1 2
3 1 2
2 1 3
2 3 1
2 1 3
1 3 2
3 2 1
2 1 3
...

output:

1

result:

ok 1 number(s): "1"

Test #31:

score: 0
Accepted
time: 2321ms
memory: 5188kb

input:

10000
3 1 2
3 2 1
2 3 1
2 1 3
3 2 1
1 2 3
2 3 1
2 3 1
2 1 3
2 1 3
3 1 2
2 1 3
2 1 3
2 3 1
1 3 2
3 1 2
2 1 3
1 2 3
2 1 3
2 1 3
1 2 3
3 1 2
2 1 3
2 1 3
2 3 1
1 2 3
1 3 2
1 3 2
2 3 1
1 3 2
2 3 1
3 1 2
3 2 1
2 3 1
2 1 3
2 3 1
2 1 3
2 1 3
2 1 3
2 1 3
1 3 2
2 3 1
3 2 1
3 1 2
3 2 1
3 1 2
3 2 1
2 3 1
2 1 3
...

output:

2

result:

ok 1 number(s): "2"

Test #32:

score: 0
Accepted
time: 24ms
memory: 3592kb

input:

1000
1 2 3
2 3 1
1 3 2
3 1 2
2 1 3
1 2 3
3 2 1
1 2 3
1 2 3
3 2 1
3 2 1
3 1 2
2 3 1
1 2 3
2 1 3
3 2 1
3 2 1
1 3 2
1 3 2
3 2 1
3 2 1
3 1 2
1 2 3
1 3 2
1 3 2
1 2 3
3 1 2
1 3 2
3 2 1
1 3 2
2 1 3
3 1 2
2 3 1
2 1 3
2 3 1
3 1 2
3 1 2
2 1 3
3 1 2
1 2 3
1 2 3
2 3 1
2 1 3
2 1 3
1 3 2
3 1 2
2 3 1
1 3 2
3 1 2
1...

output:

2

result:

ok 1 number(s): "2"

Test #33:

score: 0
Accepted
time: 24ms
memory: 3656kb

input:

1000
2 3 1
3 2 1
2 1 3
1 3 2
1 2 3
1 3 2
1 3 2
3 2 1
3 2 1
2 3 1
2 3 1
3 2 1
2 1 3
3 2 1
3 1 2
3 2 1
2 1 3
1 3 2
3 1 2
3 1 2
1 3 2
2 1 3
1 2 3
1 3 2
1 2 3
2 1 3
1 3 2
3 1 2
1 2 3
3 2 1
1 3 2
3 1 2
2 1 3
1 2 3
3 2 1
3 2 1
1 2 3
2 3 1
2 3 1
3 2 1
1 3 2
3 2 1
2 3 1
2 3 1
3 1 2
3 2 1
3 1 2
1 2 3
1 3 2
3...

output:

1

result:

ok 1 number(s): "1"

Test #34:

score: 0
Accepted
time: 24ms
memory: 3664kb

input:

1000
2 1 3
2 3 1
3 2 1
2 1 3
2 3 1
1 2 3
3 2 1
3 1 2
2 3 1
2 3 1
3 2 1
1 2 3
1 2 3
2 3 1
1 3 2
2 1 3
1 2 3
3 2 1
3 1 2
1 2 3
2 3 1
2 3 1
1 2 3
3 2 1
3 1 2
1 2 3
1 2 3
1 3 2
3 2 1
3 2 1
3 2 1
1 3 2
3 1 2
2 1 3
1 2 3
2 1 3
2 3 1
1 2 3
2 3 1
2 3 1
3 1 2
2 3 1
2 3 1
3 2 1
3 1 2
2 1 3
3 2 1
1 2 3
1 2 3
1...

output:

2

result:

ok 1 number(s): "2"

Test #35:

score: 0
Accepted
time: 21ms
memory: 3612kb

input:

1000
3 2 1
1 2 3
3 2 1
2 3 1
2 3 1
2 3 1
3 2 1
2 3 1
3 1 2
2 1 3
2 3 1
2 1 3
2 1 3
3 2 1
3 2 1
3 2 1
1 2 3
1 3 2
3 1 2
2 3 1
2 1 3
1 2 3
3 2 1
1 2 3
1 2 3
3 2 1
1 3 2
2 1 3
3 2 1
1 2 3
1 2 3
2 3 1
1 3 2
2 3 1
3 2 1
3 2 1
2 1 3
2 1 3
3 2 1
1 2 3
3 1 2
2 3 1
3 2 1
2 3 1
3 1 2
1 2 3
3 1 2
2 1 3
1 2 3
1...

output:

1

result:

ok 1 number(s): "1"

Test #36:

score: 0
Accepted
time: 24ms
memory: 3648kb

input:

1000
1 3 2
3 2 1
3 2 1
3 1 2
1 2 3
1 3 2
3 2 1
3 1 2
3 1 2
2 3 1
1 3 2
1 3 2
3 2 1
3 1 2
1 2 3
1 3 2
1 2 3
2 3 1
1 3 2
3 2 1
2 1 3
2 1 3
2 1 3
1 3 2
1 3 2
3 1 2
3 1 2
2 1 3
3 1 2
3 1 2
2 1 3
2 3 1
1 2 3
2 3 1
1 3 2
3 1 2
3 2 1
3 1 2
3 1 2
3 2 1
1 2 3
1 2 3
2 3 1
3 1 2
2 3 1
1 2 3
1 2 3
1 3 2
3 1 2
3...

output:

2

result:

ok 1 number(s): "2"

Test #37:

score: 0
Accepted
time: 24ms
memory: 3628kb

input:

1000
1 3 2
3 1 2
2 1 3
3 2 1
2 1 3
1 2 3
3 2 1
1 2 3
3 2 1
3 2 1
1 2 3
3 1 2
3 1 2
2 3 1
1 2 3
1 3 2
3 1 2
3 2 1
1 2 3
3 2 1
2 3 1
3 2 1
2 1 3
1 3 2
1 3 2
3 2 1
1 2 3
3 1 2
1 2 3
2 3 1
2 3 1
1 3 2
3 1 2
2 3 1
2 3 1
1 2 3
3 2 1
2 3 1
2 1 3
1 3 2
3 2 1
3 1 2
1 2 3
1 2 3
3 1 2
3 1 2
1 3 2
3 2 1
3 1 2
2...

output:

3

result:

ok 1 number(s): "3"

Test #38:

score: 0
Accepted
time: 26ms
memory: 3692kb

input:

1000
1 2 3
1 3 2
2 1 3
2 3 1
3 2 1
2 3 1
2 1 3
1 2 3
2 1 3
2 3 1
1 3 2
2 1 3
2 1 3
1 2 3
3 2 1
2 1 3
3 2 1
1 2 3
1 3 2
3 1 2
2 1 3
2 1 3
3 2 1
2 1 3
3 1 2
3 2 1
3 1 2
1 3 2
2 1 3
1 2 3
1 3 2
2 3 1
1 3 2
2 3 1
2 3 1
3 1 2
2 3 1
1 2 3
2 3 1
2 3 1
1 3 2
1 3 2
2 3 1
3 1 2
1 3 2
1 2 3
2 1 3
3 2 1
2 3 1
2...

output:

2

result:

ok 1 number(s): "2"

Test #39:

score: 0
Accepted
time: 24ms
memory: 3684kb

input:

1000
1 2 3
1 3 2
1 2 3
2 1 3
1 2 3
2 3 1
1 3 2
2 3 1
3 2 1
3 1 2
3 1 2
3 2 1
1 2 3
1 3 2
3 2 1
1 3 2
3 1 2
3 1 2
3 2 1
3 1 2
2 3 1
2 1 3
3 2 1
2 1 3
2 1 3
3 2 1
3 1 2
2 3 1
1 3 2
3 1 2
1 2 3
1 2 3
1 3 2
2 1 3
1 3 2
1 2 3
1 3 2
2 1 3
3 2 1
3 2 1
1 3 2
1 2 3
3 2 1
3 2 1
2 1 3
1 3 2
3 1 2
1 3 2
3 1 2
1...

output:

3

result:

ok 1 number(s): "3"

Test #40:

score: 0
Accepted
time: 24ms
memory: 3672kb

input:

1000
1 2 3
2 3 1
1 2 3
1 3 2
1 3 2
2 1 3
1 3 2
2 1 3
2 3 1
1 3 2
3 1 2
2 1 3
1 2 3
3 2 1
1 3 2
1 3 2
3 1 2
3 2 1
2 1 3
3 2 1
1 2 3
2 1 3
3 2 1
1 2 3
2 1 3
1 2 3
3 1 2
2 1 3
1 3 2
1 2 3
2 3 1
3 1 2
2 3 1
3 1 2
1 3 2
2 3 1
3 1 2
2 1 3
1 3 2
2 3 1
2 1 3
1 3 2
3 2 1
2 3 1
1 2 3
2 3 1
1 3 2
1 2 3
3 2 1
3...

output:

3

result:

ok 1 number(s): "3"

Test #41:

score: 0
Accepted
time: 24ms
memory: 3660kb

input:

1000
1 2 3
3 1 2
2 3 1
3 2 1
3 2 1
2 3 1
3 2 1
1 2 3
2 1 3
2 1 3
3 1 2
2 1 3
2 3 1
3 2 1
2 1 3
1 3 2
3 2 1
2 3 1
2 3 1
1 2 3
3 1 2
2 3 1
3 2 1
2 3 1
3 2 1
1 2 3
3 2 1
2 1 3
1 2 3
1 3 2
2 1 3
1 3 2
2 1 3
1 2 3
1 3 2
3 2 1
2 3 1
2 3 1
1 2 3
1 3 2
1 3 2
1 2 3
2 3 1
1 2 3
2 3 1
2 3 1
2 1 3
1 3 2
2 1 3
2...

output:

1

result:

ok 1 number(s): "1"

Test #42:

score: 0
Accepted
time: 24ms
memory: 3648kb

input:

1000
1 3 2
1 3 2
2 3 1
2 3 1
1 3 2
2 1 3
1 2 3
3 2 1
2 1 3
3 1 2
3 1 2
1 3 2
2 1 3
1 3 2
2 3 1
1 3 2
1 3 2
1 2 3
2 3 1
3 2 1
1 2 3
3 1 2
1 2 3
1 3 2
3 2 1
2 1 3
1 2 3
3 2 1
3 1 2
2 1 3
2 3 1
3 1 2
2 3 1
1 3 2
1 3 2
3 2 1
1 2 3
1 3 2
1 2 3
1 2 3
2 1 3
3 1 2
2 1 3
3 2 1
2 1 3
2 3 1
3 2 1
2 1 3
2 3 1
1...

output:

1

result:

ok 1 number(s): "1"

Test #43:

score: 0
Accepted
time: 24ms
memory: 3612kb

input:

1000
3 1 2
1 3 2
1 3 2
1 3 2
3 2 1
1 2 3
1 3 2
1 2 3
3 2 1
1 3 2
3 2 1
2 3 1
2 3 1
3 1 2
3 1 2
2 3 1
3 2 1
1 2 3
3 2 1
1 2 3
3 2 1
1 3 2
3 2 1
3 2 1
3 1 2
2 1 3
2 1 3
2 3 1
3 1 2
2 1 3
3 1 2
1 2 3
1 3 2
1 3 2
2 3 1
3 2 1
3 1 2
2 3 1
3 2 1
3 1 2
2 1 3
1 3 2
1 3 2
2 1 3
3 1 2
3 2 1
3 2 1
1 3 2
1 2 3
1...

output:

3

result:

ok 1 number(s): "3"

Test #44:

score: 0
Accepted
time: 21ms
memory: 3620kb

input:

1000
1 3 2
1 2 3
2 3 1
1 2 3
3 2 1
3 1 2
3 1 2
1 3 2
2 1 3
1 3 2
1 2 3
3 1 2
1 3 2
1 2 3
3 2 1
1 2 3
1 2 3
3 1 2
2 1 3
3 2 1
3 1 2
3 1 2
3 1 2
3 2 1
3 2 1
2 1 3
2 1 3
1 3 2
3 1 2
1 3 2
2 1 3
3 1 2
1 3 2
3 2 1
3 1 2
1 2 3
2 1 3
2 3 1
2 3 1
1 2 3
3 2 1
2 1 3
1 2 3
3 1 2
2 3 1
3 1 2
2 3 1
2 1 3
3 2 1
2...

output:

2

result:

ok 1 number(s): "2"

Test #45:

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

input:

1000
2 3 1
3 2 1
1 3 2
1 2 3
1 3 2
3 1 2
1 2 3
1 3 2
3 1 2
3 2 1
3 2 1
3 2 1
1 2 3
3 1 2
3 1 2
3 1 2
1 3 2
1 2 3
2 3 1
3 2 1
2 1 3
2 1 3
3 2 1
1 3 2
3 1 2
2 1 3
1 3 2
3 1 2
3 2 1
3 2 1
2 3 1
1 3 2
2 1 3
3 1 2
2 3 1
1 2 3
2 3 1
3 1 2
3 2 1
2 1 3
2 1 3
3 1 2
3 2 1
2 1 3
2 1 3
2 1 3
1 3 2
2 1 3
1 2 3
3...

output:

3

result:

ok 1 number(s): "3"

Test #46:

score: 0
Accepted
time: 24ms
memory: 3608kb

input:

1000
2 1 3
3 1 2
2 3 1
2 3 1
3 1 2
2 1 3
1 3 2
2 1 3
1 3 2
2 3 1
2 1 3
1 2 3
3 1 2
2 1 3
3 2 1
2 1 3
3 2 1
1 2 3
2 1 3
1 3 2
1 3 2
3 1 2
3 1 2
1 3 2
2 3 1
2 1 3
3 2 1
3 1 2
1 3 2
2 1 3
2 3 1
1 2 3
2 3 1
1 2 3
2 3 1
1 2 3
1 2 3
2 1 3
1 3 2
1 2 3
3 2 1
3 1 2
1 2 3
2 1 3
1 2 3
3 2 1
2 1 3
1 3 2
1 3 2
3...

output:

2

result:

ok 1 number(s): "2"

Test #47:

score: 0
Accepted
time: 24ms
memory: 3588kb

input:

1000
3 1 2
3 2 1
2 3 1
3 1 2
3 1 2
1 3 2
3 1 2
2 3 1
3 2 1
3 1 2
1 2 3
3 1 2
2 3 1
1 3 2
3 1 2
1 3 2
1 2 3
1 3 2
2 3 1
2 1 3
3 1 2
2 1 3
3 1 2
2 1 3
2 3 1
1 2 3
2 3 1
2 1 3
3 1 2
2 1 3
1 2 3
1 2 3
3 2 1
2 1 3
2 3 1
1 2 3
1 3 2
3 2 1
1 2 3
1 2 3
2 1 3
3 2 1
2 3 1
2 1 3
2 3 1
2 1 3
1 3 2
2 3 1
3 1 2
3...

output:

2

result:

ok 1 number(s): "2"

Test #48:

score: 0
Accepted
time: 21ms
memory: 3656kb

input:

1000
2 3 1
2 3 1
3 2 1
3 1 2
3 2 1
1 3 2
1 3 2
2 3 1
1 3 2
1 2 3
3 1 2
3 2 1
1 2 3
1 3 2
2 1 3
3 2 1
1 2 3
3 1 2
1 2 3
2 3 1
2 3 1
1 3 2
1 3 2
2 3 1
3 2 1
2 3 1
3 1 2
3 2 1
2 1 3
3 1 2
3 1 2
1 2 3
3 1 2
1 2 3
3 1 2
2 1 3
1 2 3
2 1 3
2 1 3
1 2 3
1 3 2
3 1 2
2 1 3
3 1 2
1 3 2
1 3 2
1 3 2
1 3 2
1 2 3
2...

output:

2

result:

ok 1 number(s): "2"

Test #49:

score: 0
Accepted
time: 24ms
memory: 3628kb

input:

1000
3 1 2
1 2 3
2 1 3
1 3 2
3 2 1
1 3 2
2 3 1
3 1 2
3 1 2
2 1 3
1 3 2
3 2 1
2 3 1
3 2 1
2 1 3
2 3 1
3 1 2
2 3 1
1 2 3
3 2 1
1 3 2
3 2 1
3 2 1
3 1 2
1 3 2
3 2 1
1 3 2
2 3 1
2 1 3
3 1 2
2 3 1
2 3 1
2 3 1
2 1 3
3 1 2
2 1 3
2 1 3
3 2 1
2 1 3
3 2 1
1 2 3
3 2 1
2 3 1
3 2 1
2 3 1
3 2 1
3 2 1
3 1 2
3 1 2
3...

output:

1

result:

ok 1 number(s): "1"

Test #50:

score: 0
Accepted
time: 21ms
memory: 3668kb

input:

1000
1 3 2
3 2 1
2 1 3
3 1 2
3 2 1
1 2 3
1 3 2
3 1 2
3 1 2
1 2 3
2 1 3
1 3 2
1 3 2
1 3 2
1 3 2
1 3 2
3 1 2
3 2 1
2 1 3
1 3 2
2 1 3
2 3 1
3 1 2
3 2 1
3 1 2
1 3 2
1 2 3
1 2 3
2 1 3
1 3 2
3 2 1
2 3 1
3 2 1
1 3 2
1 3 2
2 3 1
2 3 1
2 3 1
2 3 1
1 3 2
3 1 2
2 3 1
1 2 3
3 2 1
1 3 2
2 3 1
2 3 1
3 2 1
2 3 1
1...

output:

1

result:

ok 1 number(s): "1"

Test #51:

score: 0
Accepted
time: 24ms
memory: 3620kb

input:

1000
2 3 1
2 1 3
1 2 3
2 3 1
2 3 1
1 3 2
3 2 1
1 3 2
2 1 3
1 2 3
2 1 3
1 3 2
2 1 3
3 2 1
2 3 1
1 3 2
3 1 2
2 3 1
1 2 3
3 2 1
2 3 1
1 3 2
2 3 1
1 2 3
3 2 1
3 1 2
3 1 2
2 1 3
1 3 2
1 2 3
2 3 1
1 2 3
1 3 2
2 1 3
3 1 2
3 2 1
1 3 2
2 3 1
1 2 3
2 1 3
1 3 2
3 1 2
3 2 1
3 1 2
1 3 2
3 1 2
3 2 1
3 1 2
3 1 2
3...

output:

1

result:

ok 1 number(s): "1"

Test #52:

score: 0
Accepted
time: 2346ms
memory: 5060kb

input:

10000
1 3 2
3 2 1
1 2 3
2 3 1
1 2 3
2 3 1
1 2 3
3 1 2
1 2 3
1 3 2
2 1 3
2 1 3
1 3 2
3 1 2
2 3 1
3 1 2
2 1 3
2 1 3
3 1 2
3 1 2
2 1 3
1 2 3
2 1 3
3 1 2
3 1 2
3 2 1
1 3 2
1 3 2
3 2 1
3 2 1
2 3 1
3 1 2
1 3 2
3 2 1
3 1 2
2 3 1
2 3 1
2 3 1
3 1 2
1 3 2
2 1 3
1 3 2
2 3 1
2 3 1
3 1 2
3 1 2
3 2 1
2 3 1
1 2 3
...

output:

1

result:

ok 1 number(s): "1"

Test #53:

score: 0
Accepted
time: 2336ms
memory: 5184kb

input:

10000
1 2 3
1 2 3
2 1 3
1 3 2
2 3 1
2 1 3
1 2 3
3 2 1
3 2 1
2 1 3
3 2 1
2 3 1
3 2 1
2 1 3
1 2 3
3 1 2
2 1 3
1 2 3
1 3 2
3 2 1
1 3 2
2 3 1
3 2 1
2 1 3
3 1 2
2 1 3
3 2 1
3 2 1
1 3 2
1 3 2
1 3 2
3 2 1
1 3 2
3 1 2
2 3 1
1 2 3
1 3 2
2 3 1
1 2 3
1 2 3
2 1 3
2 3 1
1 3 2
2 1 3
2 3 1
1 2 3
3 2 1
3 2 1
3 1 2
...

output:

2

result:

ok 1 number(s): "2"

Test #54:

score: 0
Accepted
time: 2297ms
memory: 5192kb

input:

10000
3 2 1
2 1 3
1 3 2
2 3 1
2 3 1
1 2 3
1 2 3
3 1 2
1 2 3
1 3 2
1 2 3
1 3 2
3 2 1
2 3 1
3 2 1
3 2 1
3 2 1
1 3 2
3 1 2
2 3 1
1 3 2
2 1 3
3 1 2
2 1 3
1 2 3
2 3 1
3 2 1
3 1 2
3 1 2
3 1 2
3 2 1
2 3 1
3 2 1
3 1 2
3 2 1
2 1 3
1 3 2
2 1 3
3 2 1
1 3 2
2 3 1
3 1 2
2 1 3
3 1 2
2 3 1
2 1 3
3 1 2
2 3 1
2 1 3
...

output:

1

result:

ok 1 number(s): "1"

Test #55:

score: 0
Accepted
time: 2290ms
memory: 5096kb

input:

10000
1 3 2
2 1 3
2 1 3
3 2 1
1 3 2
2 3 1
2 1 3
2 1 3
1 2 3
3 2 1
2 3 1
1 3 2
1 3 2
1 3 2
2 1 3
3 2 1
1 2 3
2 3 1
2 1 3
3 2 1
1 3 2
1 2 3
1 2 3
1 3 2
3 1 2
3 2 1
2 1 3
3 1 2
3 2 1
1 2 3
2 3 1
3 2 1
1 2 3
2 1 3
3 1 2
3 1 2
1 3 2
3 1 2
3 1 2
1 3 2
3 2 1
3 2 1
3 1 2
2 1 3
2 3 1
1 3 2
3 1 2
1 2 3
1 3 2
...

output:

3

result:

ok 1 number(s): "3"

Test #56:

score: 0
Accepted
time: 2297ms
memory: 5040kb

input:

10000
3 1 2
2 1 3
2 3 1
1 3 2
2 3 1
1 2 3
3 1 2
1 3 2
2 3 1
2 3 1
1 2 3
2 3 1
1 2 3
3 2 1
1 2 3
1 3 2
2 1 3
1 2 3
2 3 1
2 3 1
1 2 3
2 3 1
1 2 3
1 3 2
1 2 3
3 2 1
3 1 2
1 3 2
3 2 1
3 1 2
2 1 3
2 3 1
2 3 1
1 2 3
1 3 2
2 1 3
1 3 2
3 1 2
1 3 2
2 3 1
1 2 3
1 2 3
3 2 1
1 2 3
3 1 2
1 2 3
3 2 1
3 1 2
3 1 2
...

output:

2

result:

ok 1 number(s): "2"

Test #57:

score: 0
Accepted
time: 2312ms
memory: 5124kb

input:

10000
3 1 2
2 3 1
2 3 1
1 3 2
2 3 1
2 3 1
2 1 3
3 1 2
3 1 2
2 3 1
2 3 1
3 1 2
2 3 1
1 2 3
1 3 2
1 2 3
1 2 3
3 2 1
1 3 2
3 2 1
1 2 3
1 2 3
1 2 3
1 2 3
3 1 2
2 3 1
1 3 2
1 2 3
1 2 3
2 3 1
1 3 2
1 2 3
3 1 2
3 1 2
1 3 2
2 1 3
3 2 1
3 2 1
1 2 3
3 1 2
2 1 3
1 3 2
1 2 3
2 1 3
2 1 3
2 1 3
1 3 2
3 2 1
1 2 3
...

output:

1

result:

ok 1 number(s): "1"

Test #58:

score: 0
Accepted
time: 2284ms
memory: 5060kb

input:

10000
3 2 1
2 1 3
1 3 2
3 1 2
1 3 2
3 1 2
1 3 2
1 2 3
3 1 2
2 3 1
3 2 1
2 3 1
1 2 3
1 3 2
2 1 3
2 3 1
3 2 1
2 1 3
1 2 3
2 1 3
1 3 2
3 1 2
1 3 2
1 2 3
2 3 1
3 1 2
2 3 1
1 2 3
1 3 2
3 2 1
1 3 2
1 3 2
2 3 1
3 1 2
1 2 3
3 1 2
3 2 1
2 3 1
3 1 2
2 1 3
3 2 1
2 3 1
3 1 2
2 1 3
2 1 3
1 3 2
3 2 1
2 1 3
3 1 2
...

output:

1

result:

ok 1 number(s): "1"

Test #59:

score: 0
Accepted
time: 2301ms
memory: 5252kb

input:

10000
2 1 3
2 3 1
1 3 2
2 3 1
2 3 1
2 3 1
3 2 1
3 1 2
1 3 2
3 2 1
3 1 2
1 3 2
3 2 1
1 3 2
1 2 3
2 3 1
1 3 2
2 1 3
2 1 3
1 3 2
3 1 2
3 1 2
2 1 3
1 2 3
3 2 1
1 2 3
2 1 3
3 1 2
1 3 2
2 1 3
3 1 2
1 3 2
3 1 2
1 3 2
2 3 1
2 1 3
2 1 3
1 2 3
3 2 1
2 1 3
2 1 3
1 2 3
3 2 1
1 2 3
3 2 1
1 3 2
1 2 3
3 1 2
1 3 2
...

output:

2

result:

ok 1 number(s): "2"

Test #60:

score: 0
Accepted
time: 2322ms
memory: 5064kb

input:

10000
2 1 3
1 2 3
1 3 2
2 1 3
2 1 3
1 2 3
3 2 1
2 1 3
2 3 1
2 3 1
2 1 3
1 2 3
2 3 1
2 1 3
3 1 2
1 2 3
2 1 3
2 3 1
1 3 2
1 2 3
2 3 1
3 1 2
1 2 3
2 1 3
1 3 2
3 2 1
3 1 2
1 2 3
2 1 3
2 3 1
2 3 1
3 2 1
2 3 1
1 3 2
2 3 1
3 1 2
2 1 3
1 2 3
3 1 2
3 2 1
3 1 2
1 3 2
2 1 3
3 1 2
1 3 2
3 1 2
3 1 2
2 1 3
2 3 1
...

output:

3

result:

ok 1 number(s): "3"

Test #61:

score: 0
Accepted
time: 2329ms
memory: 5080kb

input:

10000
1 2 3
1 3 2
2 1 3
1 3 2
1 3 2
2 3 1
1 2 3
1 3 2
1 3 2
2 3 1
1 3 2
2 3 1
3 1 2
3 2 1
1 3 2
3 1 2
2 1 3
2 3 1
2 3 1
3 2 1
3 2 1
2 3 1
3 1 2
1 2 3
1 3 2
2 3 1
3 2 1
1 3 2
3 2 1
1 2 3
2 1 3
2 3 1
1 3 2
1 2 3
1 3 2
2 1 3
2 3 1
3 1 2
2 1 3
1 2 3
2 1 3
2 3 1
2 1 3
1 2 3
2 3 1
3 2 1
2 3 1
2 1 3
3 2 1
...

output:

1

result:

ok 1 number(s): "1"

Test #62:

score: 0
Accepted
time: 2335ms
memory: 5216kb

input:

10000
1 2 3
3 1 2
3 1 2
2 1 3
1 3 2
2 1 3
2 1 3
3 1 2
1 2 3
3 2 1
2 1 3
2 1 3
1 2 3
1 3 2
1 3 2
1 3 2
1 3 2
1 3 2
1 2 3
1 3 2
2 3 1
3 2 1
2 3 1
2 3 1
2 1 3
1 2 3
2 3 1
1 3 2
1 3 2
1 3 2
1 2 3
2 1 3
3 2 1
1 3 2
2 1 3
3 1 2
3 1 2
3 1 2
2 3 1
2 3 1
3 2 1
1 3 2
1 2 3
2 3 1
2 1 3
3 2 1
1 3 2
3 2 1
3 2 1
...

output:

2

result:

ok 1 number(s): "2"

Test #63:

score: 0
Accepted
time: 2291ms
memory: 5256kb

input:

10000
2 1 3
3 1 2
3 2 1
1 2 3
3 1 2
1 2 3
2 1 3
3 1 2
3 1 2
1 2 3
2 1 3
1 2 3
2 3 1
1 3 2
1 2 3
3 1 2
3 2 1
3 2 1
2 3 1
3 2 1
2 1 3
2 1 3
3 1 2
1 3 2
2 3 1
2 1 3
1 3 2
2 3 1
2 3 1
2 1 3
3 2 1
1 2 3
1 3 2
2 3 1
1 3 2
2 3 1
2 1 3
3 2 1
3 1 2
2 3 1
3 2 1
2 3 1
3 1 2
2 1 3
2 1 3
3 1 2
3 2 1
3 2 1
1 2 3
...

output:

2

result:

ok 1 number(s): "2"

Test #64:

score: 0
Accepted
time: 2314ms
memory: 5040kb

input:

10000
2 3 1
3 2 1
1 2 3
2 3 1
1 2 3
1 2 3
3 1 2
1 3 2
2 3 1
1 2 3
1 3 2
3 2 1
3 2 1
3 2 1
3 1 2
1 3 2
2 3 1
1 2 3
1 2 3
3 2 1
2 1 3
2 3 1
1 2 3
3 2 1
2 3 1
3 1 2
3 1 2
2 1 3
1 3 2
1 2 3
1 3 2
1 3 2
3 1 2
3 1 2
2 1 3
3 1 2
1 3 2
2 1 3
3 1 2
2 3 1
2 3 1
2 3 1
2 3 1
2 3 1
1 3 2
2 3 1
1 3 2
2 1 3
1 3 2
...

output:

1

result:

ok 1 number(s): "1"

Test #65:

score: 0
Accepted
time: 2276ms
memory: 5092kb

input:

10000
2 1 3
1 3 2
2 3 1
3 1 2
3 2 1
1 3 2
1 3 2
2 1 3
3 2 1
3 1 2
2 3 1
2 3 1
1 3 2
2 3 1
2 3 1
3 2 1
3 2 1
2 3 1
2 3 1
2 3 1
2 1 3
3 2 1
3 1 2
1 2 3
2 1 3
2 1 3
1 2 3
2 1 3
1 3 2
1 3 2
1 3 2
2 1 3
2 1 3
2 3 1
1 3 2
2 3 1
3 2 1
1 3 2
3 1 2
1 2 3
1 2 3
1 2 3
3 1 2
3 1 2
1 2 3
2 3 1
2 1 3
3 2 1
1 2 3
...

output:

1

result:

ok 1 number(s): "1"

Test #66:

score: 0
Accepted
time: 2286ms
memory: 5092kb

input:

10000
1 2 3
2 3 1
1 3 2
3 1 2
2 1 3
1 2 3
3 2 1
1 2 3
1 2 3
3 2 1
3 2 1
3 1 2
2 3 1
1 2 3
2 1 3
3 2 1
3 2 1
1 3 2
1 3 2
3 2 1
3 2 1
3 1 2
1 2 3
1 3 2
1 3 2
1 2 3
3 1 2
1 3 2
3 2 1
1 3 2
2 1 3
3 1 2
2 3 1
2 1 3
2 3 1
3 1 2
3 1 2
2 1 3
3 1 2
1 2 3
1 2 3
2 3 1
2 1 3
2 1 3
1 3 2
3 1 2
2 3 1
1 3 2
3 1 2
...

output:

2

result:

ok 1 number(s): "2"

Test #67:

score: 0
Accepted
time: 2291ms
memory: 5124kb

input:

10000
1 3 2
1 3 2
2 3 1
1 2 3
3 1 2
3 1 2
3 2 1
1 3 2
3 1 2
2 1 3
1 2 3
2 3 1
2 1 3
1 3 2
2 3 1
2 1 3
3 1 2
3 1 2
1 2 3
2 3 1
2 3 1
3 1 2
2 3 1
3 2 1
3 1 2
2 1 3
3 1 2
3 1 2
2 3 1
3 1 2
1 3 2
3 2 1
3 1 2
1 2 3
2 3 1
3 2 1
1 3 2
2 1 3
1 2 3
2 1 3
1 2 3
3 2 1
3 2 1
1 3 2
1 3 2
2 1 3
1 3 2
3 1 2
1 2 3
...

output:

1

result:

ok 1 number(s): "1"

Test #68:

score: 0
Accepted
time: 2328ms
memory: 5108kb

input:

10000
3 1 2
2 1 3
3 1 2
1 3 2
3 1 2
1 3 2
2 3 1
2 3 1
2 3 1
2 3 1
2 1 3
2 3 1
2 1 3
1 3 2
3 1 2
2 3 1
3 1 2
1 2 3
2 3 1
3 1 2
1 2 3
1 3 2
2 1 3
1 3 2
2 1 3
2 3 1
2 3 1
3 2 1
1 2 3
1 3 2
3 2 1
3 2 1
2 1 3
1 2 3
2 3 1
1 3 2
3 1 2
1 3 2
1 3 2
3 2 1
1 3 2
2 1 3
1 3 2
1 2 3
2 3 1
3 2 1
1 2 3
1 2 3
2 1 3
...

output:

2

result:

ok 1 number(s): "2"

Test #69:

score: 0
Accepted
time: 2324ms
memory: 5216kb

input:

10000
3 2 1
3 1 2
2 1 3
1 2 3
1 3 2
3 2 1
1 2 3
3 1 2
1 2 3
2 1 3
2 1 3
3 2 1
1 3 2
2 3 1
3 1 2
3 1 2
3 2 1
3 2 1
2 3 1
1 2 3
1 2 3
2 3 1
2 1 3
1 2 3
2 3 1
3 2 1
2 1 3
2 1 3
2 3 1
1 3 2
1 2 3
2 1 3
3 2 1
1 3 2
2 1 3
3 1 2
2 1 3
2 3 1
1 2 3
2 1 3
3 1 2
1 3 2
3 2 1
2 3 1
2 1 3
2 1 3
2 1 3
2 1 3
1 3 2
...

output:

3

result:

ok 1 number(s): "3"

Test #70:

score: 0
Accepted
time: 2340ms
memory: 5220kb

input:

10000
1 2 3
1 3 2
1 3 2
2 1 3
3 2 1
3 2 1
3 2 1
1 3 2
3 1 2
1 2 3
3 2 1
2 3 1
3 2 1
2 3 1
3 1 2
1 3 2
3 2 1
1 2 3
2 3 1
3 1 2
2 1 3
1 2 3
3 2 1
3 2 1
1 2 3
2 1 3
3 1 2
2 3 1
3 2 1
1 3 2
3 2 1
1 2 3
1 3 2
1 2 3
1 2 3
2 1 3
3 1 2
2 3 1
1 3 2
3 2 1
3 1 2
3 1 2
1 2 3
2 1 3
1 2 3
3 2 1
3 2 1
2 1 3
3 1 2
...

output:

1

result:

ok 1 number(s): "1"

Test #71:

score: 0
Accepted
time: 2304ms
memory: 5088kb

input:

10000
2 1 3
3 2 1
1 2 3
2 3 1
2 1 3
1 2 3
1 3 2
2 3 1
2 1 3
1 2 3
3 1 2
1 2 3
1 3 2
1 3 2
2 3 1
3 2 1
1 3 2
3 1 2
1 2 3
3 2 1
2 1 3
3 2 1
1 2 3
2 3 1
1 2 3
3 2 1
1 3 2
3 2 1
2 1 3
3 2 1
1 2 3
2 1 3
2 1 3
1 3 2
1 3 2
1 2 3
3 1 2
1 2 3
1 2 3
2 1 3
1 3 2
1 3 2
1 3 2
3 1 2
1 2 3
2 1 3
1 3 2
1 3 2
2 1 3
...

output:

3

result:

ok 1 number(s): "3"

Test #72:

score: 0
Accepted
time: 2266ms
memory: 5120kb

input:

10000
3 1 2
2 1 3
1 3 2
2 3 1
2 3 1
1 2 3
1 3 2
3 2 1
1 3 2
3 2 1
3 2 1
3 2 1
3 1 2
3 2 1
3 2 1
2 1 3
3 2 1
3 2 1
3 1 2
2 3 1
1 2 3
1 3 2
3 1 2
1 3 2
1 3 2
3 1 2
3 1 2
3 1 2
2 3 1
1 3 2
2 3 1
2 1 3
2 1 3
2 1 3
3 2 1
3 1 2
1 2 3
3 2 1
3 2 1
1 2 3
3 2 1
1 3 2
1 2 3
3 2 1
1 3 2
2 3 1
3 2 1
3 1 2
2 3 1
...

output:

2

result:

ok 1 number(s): "2"

Test #73:

score: 0
Accepted
time: 2294ms
memory: 5152kb

input:

10000
1 3 2
3 1 2
3 1 2
3 2 1
3 1 2
1 3 2
1 2 3
2 3 1
3 2 1
3 1 2
3 2 1
1 3 2
1 3 2
3 2 1
2 1 3
3 1 2
3 2 1
1 2 3
3 2 1
2 3 1
3 1 2
3 2 1
2 3 1
2 3 1
2 3 1
1 3 2
1 2 3
3 2 1
2 1 3
2 3 1
2 3 1
1 3 2
2 3 1
3 2 1
3 2 1
3 2 1
2 3 1
2 3 1
1 2 3
3 2 1
2 3 1
1 3 2
3 2 1
3 1 2
1 2 3
1 2 3
1 3 2
3 2 1
1 2 3
...

output:

2

result:

ok 1 number(s): "2"

Test #74:

score: 0
Accepted
time: 2292ms
memory: 5092kb

input:

10000
3 1 2
1 2 3
3 1 2
3 1 2
1 3 2
2 3 1
1 2 3
3 1 2
3 2 1
1 3 2
2 1 3
2 1 3
3 2 1
1 3 2
2 3 1
2 1 3
3 2 1
3 2 1
3 2 1
2 3 1
1 2 3
3 2 1
2 1 3
2 3 1
2 3 1
1 3 2
3 2 1
3 1 2
2 1 3
1 3 2
3 2 1
3 2 1
1 2 3
1 2 3
3 2 1
3 1 2
2 1 3
2 3 1
2 3 1
1 3 2
3 2 1
3 1 2
2 3 1
2 3 1
3 2 1
1 2 3
3 2 1
3 1 2
1 3 2
...

output:

3

result:

ok 1 number(s): "3"

Test #75:

score: 0
Accepted
time: 2294ms
memory: 5240kb

input:

10000
2 3 1
3 2 1
3 1 2
1 3 2
3 2 1
2 3 1
3 1 2
3 1 2
1 2 3
3 2 1
2 1 3
1 3 2
1 3 2
3 2 1
2 3 1
1 3 2
1 3 2
2 1 3
3 2 1
1 3 2
3 2 1
2 3 1
2 1 3
1 3 2
1 2 3
2 3 1
2 3 1
2 3 1
1 2 3
1 2 3
3 1 2
1 3 2
2 3 1
2 1 3
2 3 1
2 1 3
3 1 2
1 2 3
1 3 2
2 3 1
1 3 2
1 3 2
3 2 1
1 3 2
2 3 1
1 2 3
2 1 3
2 1 3
3 2 1
...

output:

2

result:

ok 1 number(s): "2"

Test #76:

score: 0
Accepted
time: 2267ms
memory: 5164kb

input:

10000
1 3 2
1 2 3
2 1 3
2 1 3
1 2 3
1 3 2
2 3 1
3 2 1
2 3 1
3 2 1
1 2 3
2 1 3
2 1 3
3 1 2
1 2 3
3 1 2
3 2 1
2 1 3
2 1 3
2 3 1
2 3 1
1 3 2
3 1 2
3 1 2
1 2 3
3 2 1
2 1 3
3 2 1
3 2 1
1 3 2
3 2 1
2 3 1
1 2 3
2 1 3
2 3 1
3 1 2
1 2 3
2 1 3
2 3 1
3 1 2
3 2 1
3 2 1
1 3 2
2 1 3
1 2 3
1 2 3
2 3 1
2 1 3
1 3 2
...

output:

2

result:

ok 1 number(s): "2"

Test #77:

score: 0
Accepted
time: 2288ms
memory: 5156kb

input:

10000
2 1 3
3 2 1
3 1 2
1 2 3
1 2 3
2 3 1
1 2 3
3 1 2
2 1 3
2 3 1
3 2 1
3 2 1
1 2 3
2 3 1
1 2 3
2 1 3
2 3 1
1 3 2
2 1 3
2 1 3
2 1 3
1 3 2
1 3 2
2 1 3
1 2 3
3 2 1
2 1 3
2 3 1
3 1 2
3 1 2
2 1 3
1 3 2
2 3 1
3 1 2
1 3 2
3 2 1
1 3 2
2 1 3
2 1 3
2 1 3
3 2 1
2 3 1
2 1 3
3 2 1
2 1 3
3 1 2
2 3 1
2 3 1
2 3 1
...

output:

3

result:

ok 1 number(s): "3"

Test #78:

score: 0
Accepted
time: 2318ms
memory: 5124kb

input:

10000
3 2 1
1 2 3
2 3 1
3 2 1
1 3 2
3 2 1
3 2 1
2 3 1
3 1 2
1 2 3
1 2 3
1 3 2
1 2 3
1 3 2
2 3 1
2 3 1
1 2 3
3 1 2
3 2 1
3 1 2
2 1 3
1 2 3
1 2 3
2 1 3
1 3 2
1 3 2
3 2 1
3 2 1
1 2 3
1 2 3
3 2 1
3 2 1
3 1 2
2 1 3
1 3 2
3 1 2
3 1 2
2 3 1
1 2 3
2 1 3
3 1 2
3 1 2
1 2 3
2 3 1
2 1 3
1 2 3
1 3 2
2 3 1
3 1 2
...

output:

3

result:

ok 1 number(s): "3"

Test #79:

score: 0
Accepted
time: 2313ms
memory: 5196kb

input:

10000
3 1 2
2 1 3
3 2 1
2 1 3
3 1 2
1 2 3
2 3 1
2 1 3
3 1 2
3 2 1
1 3 2
3 2 1
2 3 1
1 2 3
2 3 1
1 3 2
2 3 1
1 3 2
2 3 1
1 3 2
2 3 1
3 2 1
1 3 2
1 2 3
3 1 2
2 3 1
1 2 3
3 2 1
3 1 2
3 2 1
1 2 3
2 1 3
3 2 1
2 1 3
2 3 1
1 3 2
1 3 2
3 2 1
2 1 3
1 3 2
2 3 1
3 1 2
2 1 3
3 1 2
3 2 1
1 2 3
2 1 3
1 3 2
2 1 3
...

output:

1

result:

ok 1 number(s): "1"

Test #80:

score: 0
Accepted
time: 2357ms
memory: 5148kb

input:

10000
3 1 2
3 1 2
3 1 2
3 2 1
1 3 2
1 2 3
2 1 3
2 1 3
2 3 1
2 1 3
1 3 2
3 2 1
2 1 3
1 2 3
1 3 2
2 1 3
3 2 1
3 1 2
3 1 2
3 2 1
1 3 2
1 3 2
3 1 2
3 2 1
1 3 2
1 3 2
2 1 3
1 2 3
2 1 3
2 1 3
3 1 2
2 3 1
1 2 3
1 2 3
1 3 2
1 2 3
3 1 2
3 2 1
2 3 1
2 1 3
2 1 3
2 1 3
3 2 1
1 2 3
2 1 3
1 3 2
3 2 1
3 1 2
1 3 2
...

output:

3

result:

ok 1 number(s): "3"

Test #81:

score: 0
Accepted
time: 2303ms
memory: 5180kb

input:

10000
3 1 2
2 1 3
2 1 3
3 1 2
1 3 2
1 3 2
3 1 2
2 1 3
3 1 2
3 1 2
3 1 2
1 2 3
3 2 1
2 3 1
3 2 1
3 2 1
2 3 1
2 1 3
2 1 3
1 3 2
1 3 2
1 3 2
1 3 2
2 3 1
2 1 3
2 3 1
2 1 3
3 2 1
3 1 2
2 1 3
1 2 3
2 3 1
2 3 1
3 1 2
2 3 1
2 3 1
2 1 3
2 3 1
3 1 2
3 1 2
3 1 2
3 1 2
1 2 3
3 1 2
2 1 3
3 2 1
1 3 2
2 1 3
2 3 1
...

output:

2

result:

ok 1 number(s): "2"

Test #82:

score: 0
Accepted
time: 2283ms
memory: 5160kb

input:

10000
1 2 3
3 2 1
3 2 1
3 2 1
1 2 3
2 3 1
2 3 1
2 3 1
2 3 1
3 1 2
2 1 3
1 3 2
3 2 1
3 2 1
1 3 2
2 1 3
3 2 1
1 2 3
3 1 2
3 2 1
2 3 1
3 1 2
1 3 2
3 1 2
2 3 1
3 1 2
2 1 3
1 2 3
2 1 3
2 1 3
3 1 2
3 1 2
2 3 1
2 3 1
2 1 3
2 3 1
2 1 3
1 3 2
1 2 3
1 2 3
3 1 2
2 1 3
2 1 3
3 2 1
1 2 3
2 3 1
2 1 3
1 2 3
3 2 1
...

output:

3

result:

ok 1 number(s): "3"

Test #83:

score: 0
Accepted
time: 2320ms
memory: 5160kb

input:

10000
1 3 2
2 3 1
1 3 2
2 1 3
1 3 2
3 1 2
3 1 2
2 3 1
3 1 2
2 3 1
2 3 1
3 1 2
3 2 1
3 1 2
1 2 3
3 2 1
1 3 2
3 2 1
3 2 1
1 3 2
1 2 3
1 2 3
1 3 2
1 2 3
3 1 2
3 2 1
3 1 2
2 3 1
1 3 2
3 1 2
2 3 1
3 1 2
3 1 2
3 2 1
3 1 2
3 2 1
3 1 2
3 2 1
1 2 3
3 1 2
2 1 3
2 3 1
2 3 1
1 3 2
1 3 2
3 1 2
3 1 2
3 1 2
3 1 2
...

output:

1

result:

ok 1 number(s): "1"

Test #84:

score: 0
Accepted
time: 2246ms
memory: 5124kb

input:

10000
3 2 1
3 1 2
3 1 2
1 2 3
1 2 3
2 3 1
1 2 3
3 2 1
1 3 2
1 3 2
2 3 1
3 2 1
2 3 1
1 3 2
2 1 3
1 2 3
2 3 1
3 2 1
3 2 1
1 2 3
3 2 1
2 1 3
2 3 1
3 1 2
1 2 3
2 1 3
3 2 1
1 2 3
3 2 1
3 1 2
2 1 3
3 1 2
3 1 2
3 1 2
2 1 3
3 1 2
3 1 2
3 1 2
1 2 3
3 1 2
2 3 1
1 2 3
1 3 2
2 3 1
1 3 2
2 3 1
3 2 1
1 2 3
3 2 1
...

output:

1

result:

ok 1 number(s): "1"

Test #85:

score: 0
Accepted
time: 2295ms
memory: 5292kb

input:

10000
3 1 2
1 3 2
2 3 1
2 3 1
3 1 2
2 1 3
2 1 3
2 3 1
2 1 3
2 1 3
3 2 1
3 2 1
3 1 2
3 2 1
3 1 2
2 1 3
1 3 2
3 2 1
2 3 1
1 3 2
3 2 1
1 2 3
3 2 1
1 3 2
1 3 2
3 2 1
1 3 2
1 2 3
2 1 3
2 3 1
3 1 2
1 2 3
3 1 2
1 3 2
1 2 3
3 2 1
3 1 2
2 1 3
2 1 3
2 1 3
1 2 3
1 2 3
3 1 2
2 1 3
2 3 1
1 3 2
1 2 3
2 1 3
1 3 2
...

output:

3

result:

ok 1 number(s): "3"

Test #86:

score: 0
Accepted
time: 2279ms
memory: 5096kb

input:

10000
1 2 3
2 3 1
2 3 1
3 2 1
3 1 2
1 3 2
3 1 2
3 2 1
1 2 3
2 1 3
1 2 3
2 1 3
3 1 2
3 2 1
3 1 2
1 2 3
2 1 3
1 3 2
1 2 3
1 2 3
1 3 2
3 1 2
1 3 2
1 2 3
3 2 1
1 3 2
3 2 1
2 1 3
2 3 1
2 1 3
2 1 3
1 3 2
2 1 3
1 2 3
3 2 1
1 3 2
1 3 2
3 2 1
3 2 1
3 2 1
3 1 2
3 2 1
1 3 2
1 2 3
2 1 3
2 1 3
2 3 1
2 3 1
1 2 3
...

output:

3

result:

ok 1 number(s): "3"

Test #87:

score: 0
Accepted
time: 2334ms
memory: 5240kb

input:

10000
1 3 2
1 2 3
2 3 1
1 2 3
2 1 3
2 3 1
3 1 2
3 2 1
3 2 1
1 2 3
3 1 2
1 3 2
3 2 1
2 3 1
3 2 1
2 1 3
3 2 1
2 1 3
3 2 1
3 1 2
2 3 1
3 1 2
3 2 1
2 1 3
2 1 3
1 2 3
1 2 3
1 3 2
3 2 1
3 1 2
2 1 3
2 3 1
2 3 1
1 3 2
1 3 2
3 2 1
1 3 2
3 1 2
3 1 2
2 3 1
2 3 1
3 1 2
3 1 2
2 1 3
2 1 3
2 3 1
1 2 3
2 3 1
2 3 1
...

output:

3

result:

ok 1 number(s): "3"

Test #88:

score: 0
Accepted
time: 2294ms
memory: 5128kb

input:

10000
1 2 3
1 3 2
3 1 2
3 2 1
1 2 3
1 3 2
2 3 1
3 1 2
3 2 1
3 1 2
3 2 1
1 2 3
1 3 2
1 2 3
2 3 1
2 3 1
3 2 1
2 3 1
3 2 1
1 3 2
3 1 2
3 2 1
2 1 3
1 3 2
3 1 2
2 1 3
2 1 3
3 2 1
3 1 2
1 2 3
3 1 2
1 3 2
3 2 1
3 1 2
3 1 2
1 3 2
3 1 2
3 1 2
1 3 2
2 1 3
3 1 2
1 2 3
1 2 3
2 3 1
1 3 2
2 3 1
3 2 1
2 3 1
1 3 2
...

output:

1

result:

ok 1 number(s): "1"

Test #89:

score: 0
Accepted
time: 2282ms
memory: 5184kb

input:

10000
3 2 1
3 1 2
1 2 3
2 1 3
2 3 1
2 3 1
3 1 2
2 1 3
2 1 3
2 1 3
3 1 2
2 1 3
1 2 3
3 2 1
2 1 3
3 1 2
3 1 2
2 1 3
2 1 3
1 2 3
1 3 2
1 2 3
3 2 1
3 2 1
2 1 3
2 1 3
1 2 3
2 3 1
3 2 1
1 3 2
2 3 1
1 3 2
3 1 2
2 1 3
3 1 2
3 1 2
1 2 3
2 3 1
3 2 1
3 2 1
2 1 3
3 2 1
3 1 2
3 2 1
1 2 3
2 1 3
3 1 2
2 1 3
3 1 2
...

output:

2

result:

ok 1 number(s): "2"

Test #90:

score: 0
Accepted
time: 2320ms
memory: 5236kb

input:

10000
1 2 3
1 2 3
2 3 1
1 3 2
1 3 2
3 1 2
1 3 2
1 3 2
2 1 3
2 3 1
2 1 3
1 2 3
2 1 3
2 1 3
2 3 1
1 3 2
1 3 2
1 2 3
2 1 3
1 3 2
1 2 3
1 2 3
1 3 2
1 2 3
2 3 1
2 3 1
3 1 2
1 3 2
1 2 3
3 2 1
3 1 2
3 1 2
3 1 2
2 3 1
1 3 2
1 2 3
2 1 3
3 1 2
1 3 2
3 1 2
2 3 1
3 2 1
3 1 2
3 1 2
1 2 3
1 2 3
2 1 3
2 1 3
3 2 1
...

output:

2

result:

ok 1 number(s): "2"

Test #91:

score: 0
Accepted
time: 2284ms
memory: 5160kb

input:

10000
3 2 1
3 1 2
1 2 3
2 3 1
2 3 1
2 1 3
2 3 1
2 3 1
1 3 2
1 3 2
1 3 2
2 3 1
2 1 3
3 2 1
2 1 3
1 2 3
3 1 2
2 1 3
1 3 2
1 2 3
1 2 3
3 1 2
1 2 3
2 3 1
1 2 3
3 1 2
1 3 2
1 2 3
1 2 3
1 3 2
3 2 1
2 1 3
1 2 3
1 2 3
2 1 3
3 2 1
1 3 2
3 1 2
1 3 2
2 3 1
3 2 1
3 2 1
2 1 3
3 1 2
1 3 2
3 2 1
3 2 1
3 2 1
1 3 2
...

output:

1

result:

ok 1 number(s): "1"

Test #92:

score: 0
Accepted
time: 2331ms
memory: 5296kb

input:

10000
3 2 1
1 3 2
3 2 1
1 2 3
3 2 1
1 2 3
3 2 1
3 1 2
3 2 1
1 2 3
1 2 3
1 2 3
2 1 3
3 1 2
3 1 2
1 3 2
2 3 1
3 2 1
2 3 1
3 2 1
1 2 3
3 2 1
1 2 3
2 1 3
3 2 1
2 1 3
1 2 3
2 1 3
2 3 1
1 2 3
1 2 3
3 2 1
1 2 3
1 2 3
2 3 1
2 1 3
2 1 3
2 3 1
2 1 3
3 1 2
3 2 1
3 2 1
2 3 1
1 2 3
2 3 1
3 1 2
2 3 1
3 1 2
2 3 1
...

output:

2

result:

ok 1 number(s): "2"

Test #93:

score: 0
Accepted
time: 2286ms
memory: 5080kb

input:

10000
2 3 1
3 2 1
3 2 1
3 2 1
2 3 1
2 1 3
3 2 1
1 3 2
3 2 1
1 2 3
1 2 3
2 3 1
2 3 1
1 2 3
2 1 3
1 3 2
1 2 3
3 1 2
1 3 2
2 1 3
1 2 3
1 3 2
1 3 2
2 3 1
1 3 2
2 3 1
3 2 1
3 2 1
1 2 3
1 2 3
3 2 1
1 3 2
2 1 3
1 3 2
2 3 1
1 3 2
3 1 2
1 3 2
2 3 1
2 3 1
3 1 2
3 2 1
2 3 1
1 3 2
3 2 1
3 2 1
1 2 3
1 2 3
1 3 2
...

output:

3

result:

ok 1 number(s): "3"

Test #94:

score: 0
Accepted
time: 2327ms
memory: 5188kb

input:

10000
1 3 2
1 2 3
3 2 1
2 1 3
2 1 3
1 3 2
2 3 1
3 1 2
3 2 1
1 3 2
3 1 2
2 1 3
1 3 2
1 2 3
2 1 3
3 1 2
3 2 1
1 3 2
1 2 3
3 1 2
2 3 1
1 2 3
2 1 3
2 1 3
1 2 3
1 2 3
2 1 3
1 2 3
3 1 2
1 2 3
3 1 2
3 1 2
1 2 3
3 2 1
1 2 3
1 3 2
3 2 1
3 1 2
1 3 2
2 1 3
3 2 1
2 1 3
2 1 3
2 3 1
3 1 2
1 2 3
2 1 3
1 3 2
3 1 2
...

output:

1

result:

ok 1 number(s): "1"

Test #95:

score: 0
Accepted
time: 2277ms
memory: 5068kb

input:

10000
1 3 2
3 2 1
2 3 1
2 1 3
1 2 3
2 3 1
3 2 1
3 2 1
2 3 1
2 3 1
2 3 1
2 3 1
3 2 1
2 1 3
3 1 2
2 1 3
2 1 3
3 2 1
2 1 3
3 1 2
2 1 3
1 3 2
2 3 1
3 2 1
2 1 3
2 3 1
3 1 2
3 1 2
1 3 2
3 2 1
3 1 2
1 3 2
2 3 1
1 2 3
3 1 2
2 3 1
2 3 1
3 2 1
3 2 1
1 3 2
3 2 1
1 3 2
2 1 3
3 1 2
3 1 2
2 1 3
3 1 2
1 3 2
1 2 3
...

output:

1

result:

ok 1 number(s): "1"

Test #96:

score: 0
Accepted
time: 2327ms
memory: 5136kb

input:

10000
2 3 1
1 2 3
1 2 3
1 2 3
2 1 3
2 1 3
1 2 3
3 2 1
3 1 2
1 2 3
1 2 3
2 3 1
3 1 2
2 3 1
3 1 2
1 3 2
1 2 3
3 2 1
2 3 1
2 3 1
3 1 2
3 2 1
1 3 2
3 1 2
3 2 1
1 2 3
3 1 2
1 2 3
1 2 3
1 3 2
3 2 1
1 2 3
3 1 2
3 1 2
3 1 2
2 3 1
3 1 2
2 3 1
2 1 3
1 2 3
1 2 3
1 2 3
3 1 2
2 1 3
1 3 2
1 2 3
2 3 1
3 1 2
1 3 2
...

output:

2

result:

ok 1 number(s): "2"

Test #97:

score: 0
Accepted
time: 2324ms
memory: 5140kb

input:

10000
1 3 2
2 3 1
3 1 2
2 3 1
2 3 1
1 2 3
2 3 1
1 3 2
1 2 3
2 3 1
3 1 2
1 3 2
2 3 1
3 1 2
3 1 2
1 2 3
3 1 2
3 2 1
3 1 2
3 1 2
3 1 2
2 3 1
2 1 3
2 1 3
2 3 1
2 3 1
2 3 1
2 1 3
1 3 2
2 3 1
3 1 2
1 3 2
1 2 3
1 3 2
3 2 1
3 1 2
3 1 2
2 1 3
2 1 3
2 1 3
1 2 3
3 1 2
1 2 3
1 2 3
3 1 2
2 1 3
3 1 2
1 2 3
2 3 1
...

output:

3

result:

ok 1 number(s): "3"

Test #98:

score: 0
Accepted
time: 2297ms
memory: 5092kb

input:

10000
1 2 3
2 1 3
2 1 3
3 1 2
2 1 3
1 3 2
1 3 2
2 3 1
1 3 2
1 3 2
2 3 1
3 2 1
2 1 3
2 3 1
1 2 3
1 3 2
3 2 1
2 3 1
3 1 2
3 2 1
1 3 2
3 2 1
3 1 2
1 3 2
2 1 3
3 1 2
2 3 1
3 2 1
1 2 3
3 1 2
3 2 1
2 3 1
3 1 2
1 3 2
3 1 2
3 1 2
2 1 3
1 2 3
3 1 2
2 1 3
1 2 3
2 3 1
1 3 2
1 2 3
1 2 3
3 2 1
3 1 2
2 3 1
3 1 2
...

output:

3

result:

ok 1 number(s): "3"

Test #99:

score: 0
Accepted
time: 0ms
memory: 3492kb

input:

1
1 2 3

output:

1

result:

ok 1 number(s): "1"

Test #100:

score: 0
Accepted
time: 0ms
memory: 3412kb

input:

1
2 3 1

output:

2

result:

ok 1 number(s): "2"

Test #101:

score: 0
Accepted
time: 2299ms
memory: 5148kb

input:

10000
2 3 1
3 1 2
3 2 1
3 2 1
1 2 3
1 2 3
2 3 1
3 2 1
1 3 2
1 3 2
2 3 1
1 2 3
3 2 1
3 2 1
2 3 1
1 3 2
2 1 3
1 3 2
2 1 3
1 3 2
1 3 2
3 1 2
2 3 1
2 3 1
3 2 1
3 1 2
3 2 1
1 3 2
1 3 2
3 2 1
3 2 1
1 2 3
3 2 1
1 2 3
2 3 1
2 3 1
2 3 1
2 3 1
2 3 1
2 1 3
2 1 3
2 1 3
2 3 1
2 3 1
2 3 1
2 3 1
3 2 1
2 1 3
1 2 3
...

output:

1

result:

ok 1 number(s): "1"

Test #102:

score: 0
Accepted
time: 24ms
memory: 3672kb

input:

1000
1 3 2
2 3 1
2 1 3
3 1 2
1 3 2
1 3 2
1 3 2
3 2 1
3 2 1
2 3 1
1 3 2
1 2 3
2 1 3
1 2 3
1 3 2
1 2 3
3 2 1
2 3 1
3 2 1
2 1 3
1 3 2
2 3 1
2 3 1
3 2 1
2 1 3
3 1 2
1 2 3
2 3 1
1 2 3
2 1 3
2 3 1
1 2 3
3 2 1
3 2 1
2 1 3
3 2 1
3 2 1
2 3 1
3 2 1
1 2 3
1 2 3
2 3 1
1 2 3
3 2 1
1 2 3
1 3 2
1 3 2
2 3 1
2 1 3
2...

output:

2

result:

ok 1 number(s): "2"

Test #103:

score: 0
Accepted
time: 6ms
memory: 3508kb

input:

500
1 3 2
2 3 1
2 1 3
2 1 3
3 1 2
2 1 3
3 1 2
2 3 1
3 2 1
1 2 3
1 3 2
1 3 2
1 3 2
1 3 2
1 3 2
2 3 1
3 2 1
3 1 2
2 1 3
2 3 1
2 3 1
1 3 2
3 1 2
3 1 2
3 1 2
1 3 2
1 2 3
2 1 3
1 3 2
2 1 3
3 2 1
1 3 2
1 3 2
3 1 2
1 2 3
2 3 1
3 2 1
1 2 3
1 2 3
2 1 3
2 3 1
1 3 2
2 1 3
2 1 3
3 2 1
2 3 1
1 3 2
2 1 3
2 1 3
3 ...

output:

1

result:

ok 1 number(s): "1"

Test #104:

score: 0
Accepted
time: 3ms
memory: 3532kb

input:

300
3 1 2
2 3 1
1 2 3
3 2 1
1 2 3
2 1 3
3 1 2
1 2 3
3 2 1
1 2 3
1 2 3
3 2 1
2 3 1
1 2 3
2 3 1
2 1 3
3 1 2
3 1 2
2 1 3
2 1 3
2 3 1
2 1 3
3 1 2
1 3 2
3 2 1
1 3 2
3 1 2
1 3 2
2 1 3
1 3 2
2 1 3
1 2 3
2 1 3
3 2 1
2 1 3
1 2 3
2 1 3
1 3 2
3 1 2
1 3 2
2 1 3
1 3 2
3 2 1
3 1 2
3 1 2
2 1 3
1 3 2
2 3 1
3 2 1
1 ...

output:

1

result:

ok 1 number(s): "1"

Test #105:

score: 0
Accepted
time: 1ms
memory: 3548kb

input:

100
3 2 1
3 1 2
1 2 3
2 1 3
3 2 1
3 2 1
1 2 3
1 3 2
3 1 2
3 2 1
3 1 2
1 3 2
3 2 1
2 1 3
2 1 3
3 2 1
2 1 3
3 2 1
1 3 2
3 2 1
1 2 3
1 3 2
3 2 1
3 1 2
1 3 2
3 1 2
3 1 2
3 1 2
1 3 2
3 1 2
2 1 3
1 3 2
1 2 3
3 1 2
3 2 1
1 2 3
1 3 2
3 2 1
1 3 2
1 3 2
2 1 3
1 3 2
3 2 1
3 2 1
2 1 3
1 3 2
3 1 2
1 2 3
1 2 3
2 ...

output:

2

result:

ok 1 number(s): "2"

Extra Test:

score: 0
Extra Test Passed