<gh_stars>10-100
input = """
1 2 0 0
1 3 0 0
1 4 0 0
1 5 0 0
1 6 0 0
1 7 0 0
1 8 0 0
1 9 0 0
1 10 0 0
1 11 0 0
1 12 0 0
1 13 0 0
1 14 0 0
1 15 0 0
1 16 0 0
1 17 0 0
1 18 1 1 19
1 20 1 1 21
1 22 1 1 23
1 24 1 1 25
1 26 1 1 27
1 28 1 1 29
1 19 1 1 18
1 21 1 1 20
1 23 1 1 22
1 25 1 1 24
1 27 1 1 26
1 29 1 1 28
1 1 1 1 18
2 30 2 0 2 22 20
1 1 1 1 30
2 31 3 0 1 28 26 24
1 32 1 1 31
1 1 1 1 32
2 33 3 0 2 24 20 18
2 34 3 0 3 24 20 18
1 35 2 1 34 33
1 1 1 1 35
2 36 1 0 1 26
1 37 1 1 36
1 1 1 1 37
2 38 2 0 1 28 22
2 39 2 0 2 28 22
1 40 2 1 39 38
1 1 1 1 40
1 1 2 0 20 19
1 1 2 0 22 19
1 1 2 0 24 21
1 1 2 0 24 23
1 1 2 0 26 21
1 1 2 0 26 23
1 1 2 0 28 21
1 1 2 0 28 23
1 1 2 0 20 23
1 1 2 0 22 21
1 1 2 0 24 27
1 1 2 0 24 29
1 1 2 0 26 25
1 1 2 0 26 29
1 1 2 0 28 25
1 1 2 0 28 27
0
2 xsucc(1,2)
3 xsucc(2,3)
18 filled(3,3)
20 filled(3,2)
22 filled(1,2)
24 filled(3,1)
26 filled(2,1)
28 filled(1,1)
4 ysucc(1,2)
5 ysucc(2,3)
19 unfilled(3,3)
21 unfilled(3,2)
23 unfilled(1,2)
25 unfilled(3,1)
27 unfilled(2,1)
29 unfilled(1,1)
12 xvalue(1,0)
13 xvalue(2,2)
14 xvalue(3,1)
6 bottle(1,1,1)
7 bottle(1,2,1)
8 bottle(1,3,1)
9 bottle(1,1,2)
10 bottle(1,3,2)
11 bottle(1,3,3)
15 yvalue(1,1)
16 yvalue(2,0)
17 yvalue(3,2)
0
B+
0
B-
1
0
1
"""
output = """
{xsucc(1,2), xsucc(2,3), ysucc(1,2), ysucc(2,3), bottle(1,1,1), bottle(1,2,1), bottle(1,3,1), bottle(1,1,2), bottle(1,3,2), bottle(1,3,3), xvalue(1,0), xvalue(2,2), xvalue(3,1), yvalue(1,1), yvalue(2,0), yvalue(3,2), filled(3,3), filled(3,2), filled(1,2), unfilled(3,1), unfilled(2,1), unfilled(1,1)}
"""

input = """
1 2 0 0
1 3 0 0
1 4 0 0
1 5 0 0
1 6 0 0
1 7 0 0
1 8 0 0
1 9 0 0
1 10 0 0
1 11 0 0
1 12 0 0
1 13 0 0
1 14 0 0
1 15 0 0
1 16 0 0
1 17 0 0
1 18 1 1 19
1 20 1 1 21
1 22 1 1 23
1 24 1 1 25
1 26 1 1 27
1 28 1 1 29
1 19 1 1 18
1 21 1 1 20
1 23 1 1 22
1 25 1 1 24
1 27 1 1 26
1 29 1 1 28
1 1 1 1 18
2 30 2 0 2 22 20
1 1 1 1 30
2 31 3 0 1 28 26 24
1 32 1 1 31
1 1 1 1 32
2 33 3 0 2 24 20 18
2 34 3 0 3 24 20 18
1 35 2 1 34 33
1 1 1 1 35
2 36 1 0 1 26
1 37 1 1 36
1 1 1 1 37
2 38 2 0 1 28 22
2 39 2 0 2 28 22
1 40 2 1 39 38
1 1 1 1 40
1 1 2 0 20 19
1 1 2 0 22 19
1 1 2 0 24 21
1 1 2 0 24 23
1 1 2 0 26 21
1 1 2 0 26 23
1 1 2 0 28 21
1 1 2 0 28 23
1 1 2 0 20 23
1 1 2 0 22 21
1 1 2 0 24 27
1 1 2 0 24 29
1 1 2 0 26 25
1 1 2 0 26 29
1 1 2 0 28 25
1 1 2 0 28 27
0
2 xsucc(1,2)
3 xsucc(2,3)
18 filled(3,3)
20 filled(3,2)
22 filled(1,2)
24 filled(3,1)
26 filled(2,1)
28 filled(1,1)
4 ysucc(1,2)
5 ysucc(2,3)
19 unfilled(3,3)
21 unfilled(3,2)
23 unfilled(1,2)
25 unfilled(3,1)
27 unfilled(2,1)
29 unfilled(1,1)
12 xvalue(1,0)
13 xvalue(2,2)
14 xvalue(3,1)
6 bottle(1,1,1)
7 bottle(1,2,1)
8 bottle(1,3,1)
9 bottle(1,1,2)
10 bottle(1,3,2)
11 bottle(1,3,3)
15 yvalue(1,1)
16 yvalue(2,0)
17 yvalue(3,2)
0
B+
0
B-
1
0
1
"""
output = """
{xsucc(1,2), xsucc(2,3), ysucc(1,2), ysucc(2,3), bottle(1,1,1), bottle(1,2,1), bottle(1,3,1), bottle(1,1,2), bottle(1,3,2), bottle(1,3,3), xvalue(1,0), xvalue(2,2), xvalue(3,1), yvalue(1,1), yvalue(2,0), yvalue(3,2), filled(3,3), filled(3,2), filled(1,2), unfilled(3,1), unfilled(2,1), unfilled(1,1)}
"""
1 2 0 0 1 3 0 0 1 4 0 0 1 5 0 0 1 6 0 0 1 7 0 0 1 8 0 0 1 9 0 0 1 10 0 0 1 11 0 0 1 12 0 0 1 13 0 0 1 14 0 0 1 15 0 0 1 16 0 0 1 17 0 0 1 18 1 1 19 1 20 1 1 21 1 22 1 1 23 1 24 1 1 25 1 26 1 1 27 1 28 1 1 29 1 19 1 1 18 1 21 1 1 20 1 23 1 1 22 1 25 1 1 24 1 27 1 1 26 1 29 1 1 28 1 1 1 1 18 2 30 2 0 2 22 20 1 1 1 1 30 2 31 3 0 1 28 26 24 1 32 1 1 31 1 1 1 1 32 2 33 3 0 2 24 20 18 2 34 3 0 3 24 20 18 1 35 2 1 34 33 1 1 1 1 35 2 36 1 0 1 26 1 37 1 1 36 1 1 1 1 37 2 38 2 0 1 28 22 2 39 2 0 2 28 22 1 40 2 1 39 38 1 1 1 1 40 1 1 2 0 20 19 1 1 2 0 22 19 1 1 2 0 24 21 1 1 2 0 24 23 1 1 2 0 26 21 1 1 2 0 26 23 1 1 2 0 28 21 1 1 2 0 28 23 1 1 2 0 20 23 1 1 2 0 22 21 1 1 2 0 24 27 1 1 2 0 24 29 1 1 2 0 26 25 1 1 2 0 26 29 1 1 2 0 28 25 1 1 2 0 28 27 0 2 xsucc(1,2) 3 xsucc(2,3) 18 filled(3,3) 20 filled(3,2) 22 filled(1,2) 24 filled(3,1) 26 filled(2,1) 28 filled(1,1) 4 ysucc(1,2) 5 ysucc(2,3) 19 unfilled(3,3) 21 unfilled(3,2) 23 unfilled(1,2) 25 unfilled(3,1) 27 unfilled(2,1) 29 unfilled(1,1) 12 xvalue(1,0) 13 xvalue(2,2) 14 xvalue(3,1) 6 bottle(1,1,1) 7 bottle(1,2,1) 8 bottle(1,3,1) 9 bottle(1,1,2) 10 bottle(1,3,2) 11 bottle(1,3,3) 15 yvalue(1,1) 16 yvalue(2,0) 17 yvalue(3,2) 0 B+ 0 B- 1 0 1 {xsucc(1,2), xsucc(2,3), ysucc(1,2), ysucc(2,3), bottle(1,1,1), bottle(1,2,1), bottle(1,3,1), bottle(1,1,2), bottle(1,3,2), bottle(1,3,3), xvalue(1,0), xvalue(2,2), xvalue(3,1), yvalue(1,1), yvalue(2,0), yvalue(3,2), filled(3,3), filled(3,2), filled(1,2), unfilled(3,1), unfilled(2,1), unfilled(1,1)}