Masala #ZXTRQNWLJJ

Xotira 64 MB Vaqt 1250 ms
14

Belgili to`plamlar

.


Kiruvchi ma'lumotlar:

.


Chiquvchi ma'lumotlar:

.


Misollar
# input.txt output.txt
1
3 6
1 1 abc
1 3 bar
2 1 3
2 2 2
1 1 a
2 1 1
6
0
2
2
1 3
1 1 salom
1 1 dunyo
2 1 1
8
Izoh:

.