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