Sumo and Coins
题号:NC207581
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
64bit IO Format: %lld

题目描述

There are n coins on Sumo's table, each coin has two sides, of the coins face up, and of the coins face down. Sumo wants to make these coins have the same side.

Each time he can flip any n-1 of these coins, he can do this operation any number of times(possibly zero).

Please tell him if he can make these coins have the same side.

输入描述:

The first line of the input is a single integer , T test cases follow.

Each test case has three integers , a, b(a+b=n).

输出描述:

If all the coins can face up or down, output "ALL"(without quotes);

If all the coins can only face up, output "UP"(without quotes);

If all the coins can only face down, output "DOWN"(without quotes);

If all the coins cannot face the same side, output "NULL"(without quotes).
示例1

输入

复制
1
2 1 1

输出

复制
ALL

备注:

In the example, Sumo can flip the coin facing up or down so that all the coins are facing the same way after the first operation.