1([).runstdin def 1[{1 1[{1 index 0 2{exch[mod 1 le{1 or}if}repeat =only}for()= pop}for