X = int(input()) # Initial solution (n=2) x = 10 y = 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