M = int(input()) m = 2 for i in range(127): m = (m * 2) % M print(m)