Problem 4.1. On nine cards, the numbers from 1 to 9 are written (each one only once). These cards were laid out in a row such that there are no three consecutive cards with numbers in ascending order, and there are no three consecutive cards with numbers in descending order. Then, three cards were flipped over, as shown in the figure. What numbers are written on them?

![](https://cdn.mathpix.com/cropped/2024_05_06_0323bbf84409a1adeb34g-02.jpg?height=113&width=1003&top_left_y=388&top_left_x=225)

- The number on card $A$ is ...
- The number on card $B$ is ...
- The number on card $C$ is ...
Answer: The number 5 is written on card $A$, the number -2 on card $B$, and the number -9 on card $C$.

Solution. The missing numbers are $-2, 5$, and 9.

If the number 5 is on card $B$, then we get the consecutive numbers 3, 4, 5. If the number 5 is on card $C$, then we get the consecutive numbers 8, 7, 5. Therefore, the number 5 can only be on card $A$.

If the number 2 is on card $C$, then we get the consecutive numbers 8, 7, 2. Therefore, the number 2 is written on card $B$, and 9 is on card $C$.

![](https://cdn.mathpix.com/cropped/2024_05_06_0323bbf84409a1adeb34g-02.jpg?height=101&width=999&top_left_y=1064&top_left_x=225)

The resulting variant fits.