from pytokr import item, items
print("Start of Jutge testing")

ls = list()
k = int(item()) # first
for q in items():
    if q == "===":
        "new case"
        print(k, ls, disorder_test(k, ls))
        ls = list()
        k = int(item())
    else:
        "part of ongoing case"
        ls.append(int(q))
print(k, ls, disorder_test(k, ls)) # last stdin case
if ls == []:
	ls = [5] # last long test for TLE
	ls.extend(range(2900000))
	print("long:", disorder_test(0, ls))

print("Finish of a Jutge test")