| Code Rush 2025 |
|---|
| Finished |
The Malinche mountain, in Puebla Sergio is an avid hiker who loves exploring mountain trails and deep valleys. On his latest adventure, he recorded the elevation at three consecutive points along his path. Now, he wants to determine whether he just climbed over a peak or descended into a valley.
Given three integers $$$a, b, c$$$ representing the elevations at three consecutive points along Sergio's hike, determine whether these points form a mountain (a peak) or a valley:
Can you help Sergio determine if he climbed a mountain or a valley?
The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of hikes Sergio did. Each of the next $$$t$$$ lines contains 3 integers $$$a, b, c$$$ ($$$1 \leq a, b, c \leq 1000$$$) — the recorded elevations.
Output $$$t$$$ strings — MOUNTAIN if Sergio climbed a mountain, or VALLEY if Sergio climbed a valley. It is guaranteed that the elevations will correspond to one of these categories.
11 2 1
MOUNTAIN
21 2 13 1 2
MOUNTAIN VALLEY
| Name |
|---|


