import itertools


for c in itertools.product("12", repeat=6):

    s = "".join(c)
    if int(s) % 72 == 0:

        print(s)
