cp/codeforces/900/d.in

31 lines
118 B
Text

5
4 2
abcd
1 3
2 4
1
1
5 3
abcde
1 2 3
1 2 5
3
1 2 3
3 1
gaf
1
3
2
2 2
10 1
aghcdegdij
1
10
5
1 2 3 4 2
1 1
a
1
1
1
1