N. Nature's Delights
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output
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:

  • A mountain occurs if $$$a \lt b \gt c$$$ (i.e., the middle elevation is the highest).
  • A valley occurs if $$$a \gt b \lt c$$$ (i.e., the middle elevation is the lowest).

Can you help Sergio determine if he climbed a mountain or a valley?

Input

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

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.

Examples
Input
1
1 2 1
Output
MOUNTAIN
Input
2
1 2 1
3 1 2
Output
MOUNTAIN
VALLEY