input = """
3 2 2 3 1 0 4
2 5 2 0 1 2 3
1 1 2 1 5 4
2 6 2 0 2 2 3
1 1 2 0 6 4
1 4 0 0
3 3 7 8 9 1 0 10
2 11 3 0 1 7 8 9
1 1 2 1 11 10
2 12 3 0 2 7 8 9
1 1 2 0 12 10
1 10 0 0
1 13 1 0 9
1 14 1 0 8
1 15 1 0 7
1 16 1 0 9
1 17 1 0 7
1 18 1 1 16
1 19 1 1 17
1 20 3 0 14 18 13
1 21 3 0 14 19 15
1 1 2 1 21 2
1 1 2 1 20 3
0
21 s
16 i
3 e
20 r
13 f
9 a
14 g
17 l
8 b
18 o
2 d
19 p
15 h
7 c
0
B+
0
B-
1
0
1
"""
output = """
INCOHERENT
"""
