X = int(input()) x, y = 7, 5 # Starting from the first valid solution (a=3, b=4, c=5) while True: current_digits = len(str(y)) if current_digits == X: a = (x - 1) // 2 b = a + 1 print(a, b, y) 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