def win1(x):
if x>0 and (x-1==0 or x-2==0): return True
return False
def los1(x):
if win1(x-1) and win1(x-2): return True
return False
def win2(x):
if not(win1(x)) and (los1(x-1) or los1(x-2)): return True
return False
def los12(x):
if not(los1(x)) and (win1(x-1) or win2(x-1)) and (win1(x-2) or win2(x-2)): return True
return False
for i in range(10):
if los12(i): print(i)