print(*[pow(3, i) for i in range(9)])