X = int(input()) # Initialize the first valid solution (x=7, y=5) which gives a=3, c=5 (1 digit) current_x, current_y = 7, 5 while True: a = (current_x - 1) // 2 c = current_y if len(str(c)) == X: print(a, a + 1, c) break # Generate next solution using the recurrence relations next_x = 3 * current_x + 4 * current_y next_y = 2 * current_x + 3 * current_y current_x, current_y = next_x, next_y