X = int(input()) # Initial solution (x, y) corresponding to a=3, b=4, c=5 x, y = 10, 7 while True: c = x // 2 a = (y - 1) // 2 if len(str(c)) == X: print(a, a + 1, c) break # Generate next solution using the recurrence relation next_x = 3 * x + 4 * y next_y = 2 * x + 3 * y x, y = next_x, next_y