for i in range(4243):'42'in str(i)==print(42**i)