print(" ".join(list(map(str, [3**i for i in range(9)]))))