Two beavers, Timur and Marsel, play the following game.

There are *n* logs, each of exactly *m* meters in length. The beavers move in turns. For each move a beaver chooses a log and gnaws it into some number (more than one) of equal parts, the length of each one is expressed by an integer and is no less than *k* meters. Each resulting part is also a log which can be gnawed in future by any beaver. The beaver that can't make a move loses. Thus, the other beaver wins.

Timur makes the first move. The players play in the optimal way. Determine the winner.
The first line contains three integers *n*, *m*, *k* (1 ≤ *n*, *m*, *k* ≤ 10<sup class="upper-index">9</sup>).
In the first sample the beavers only have one log, of 15 meters in length. Timur moves first. The only move he can do is to split the log into 3 parts each 5 meters in length. Then Marsel moves but he can't split any of the resulting logs, as *k* = 4. Thus, the winner is Timur.

In the second example the beavers have 4 logs 9 meters in length. Timur can't split any of them, so that the resulting parts possessed the length of not less than 5 meters, that's why he loses instantly.
1 15 4
Timur
4 9 5
Marsel
14 30 9
Marsel
81 180 53
Timur
225 187 20
Marsel
501 840 11
Timur
3 11 6
Marsel
1 2 1
Timur
1 1 2
Marsel
1 1 1
Marsel
1 2 2
Marsel
2 1 1
Marsel
2 1 2
Marsel
2 2 1
Marsel
2 2 2
Marsel
1000000000 1000000000 1000000000
Marsel
999999999 735134400 1
Timur
999999999 735134400 100
Timur
787965358 999999986 2
Marsel
588462355 999999986 2
Timur
994427144 999999986 10
Marsel
36948983 999999986 10
Timur
431525232 999999986 250000000
Marsel
502291145 999999986 250000000
Timur
612116696 999999986 499999993
Marsel
559551717 999999986 499999993
Timur
844774784 999999894 30
Marsel
776970029 999999894 30
Timur
726014914 999950443 31643
Marsel
350735191 999950443 31643
Timur
114514534 999950443 31601
Marsel
689283015 999950443 31601
Timur
585863414 999002449 31607
Marsel
271824601 999002449 31607
Timur
57784860 999002449 1
Marsel
844093323 999002449 1
Timur
623425842 999002449 10
Marsel
283831003 999002449 10
Timur
884219706 735134400 1
Marsel
519313933 735134400 1
Timur
483982088 735134400 2
Marsel
966249765 735134400 2
Timur
362305942 735134400 367567201
Marsel
311659875 735134400 367567201
Marsel
717978658 735134400 100000000
Marsel
367890897 735134400 100000000
Timur
52049820 735134400 200000000
Marsel
395681265 735134400 200000000
Timur
195335332 735134400 300000000
Marsel
2240305 735134400 300000000
Timur
166548792 901800900 30030
Marsel
708577575 901800900 30030
Timur
304908040 901800900 901800900
Marsel
799852313 901800900 901800900
Marsel
624970498 901800900 901800901
Marsel
373293701 901800900 901800901
Marsel
1608018 999999937 1
Marsel
830273749 999999937 1
Timur
859437048 999999937 2
Marsel
672396661 999999937 2
Marsel
763677180 999999937 111
Marsel
605998637 999999937 111
Marsel
938316524 999999937 1000000000
Marsel
885233939 999999937 1000000000
Marsel
522619786 1000000000 500000000
Marsel
780954779 1000000000 500000000
Timur
568419816 1000000000 500000001
Marsel
300872687 1000000000 500000001
Marsel
628290298 1000000000 1250
Marsel
56021277 1000000000 1250
Timur
538604320 536870912 268435456
Marsel
719320775 536870912 268435456
Timur
911637544 536870912 134217728
Marsel
104077283 536870912 134217728
Timur
167283896 935821597 191101
Marsel
753528595 935821597 191101
Timur
907605112 935821597 11274959
Marsel
327082339 935821597 11274959
Timur
316344442 935821597 22824917
Marsel
244672063 935821597 22824917
Timur
1000000000 1000000000 36
Marsel
1 1000000000 1000000000
Marsel
2 10 1
Marsel
1 999999991 488888888
Marsel
4 9 4
Marsel
1 3 2
Marsel
1 1000000000 1
Timur
1 999999938 999999937
Marsel
1 7 1
Timur
101 1 1
Marsel
999999999 1000000000 1000000000
Marsel
1 200000 100000
Timur
1 9 3
Timur
def visual(a,k,g):
	for i in range(len(a)):
		if i != k and i != g:
			print(' ')
		else:
			print(a[i])
	for i in range(len(a)):
		if i != k and i != g:
			print(a[i])
		else:
			print(' ')

n=int(input())
a=[int(input()) for i in range(n)]
for i in range(n):
	for j in range(n-i):
		if a[j]>a[j+1]:
			visual(a,j,j+1)
			swap(a[j],a[j+1])
			visual(a,j,j+1)
		else:
			break
print(a)