n=1 while True: if n%9==7 and n%5==2 and n%4==1: print(n) break n+=1