SP15867 SNGGW - Great Warrior
Description
This problem is about an imaginary game. First of all, define a **War Board** that is a **N x N square matrix**. Each matrix cell represents a warrior and the value written in the cell is the power of that particular warrior.
**Rules for assigning powers of each warrior**
**1.** First start filling the main diagonal with numbers **1, 2, 3, 4 .... K** according to requirement. Starting of filling always be at the top corner.
**2.** Now start filling the anti diagonal with numbers **k + 1, k + 2, k + 3, k + 4 .... L** according to requirement. Starting of filling always be at the bottom corner. **Don't forget that in case of filling the anti diagonal if there is any number already filled it will be modified by the current number that is to be filled, if that particular cell was empty**.
**3.** Now fill all the empty cells, in **anti-clockwise spiral** filling manner. The first cell to be filled will be **2nd last column of first row**.
**5 x 5 War Board**

**Description of game**
The greatest warrior **W** of king Pushyamitra Shunga is having fight with Yavana warriors. W fights with one Yavana warrior **Y** at a time. Consider the followings
**1.** **Power\_of\_W is more than Yavanas**.
**2.** W can defeat Y if **Power\_of\_W > Power\_of\_Y - 1**
**3.** After each win **Power\_of\_W decreases by Power\_of\_Y**
**4.** W can move to cells adjacent to it. If **Current\_Cell\_Location\_of\_W** is **(i, j)** then
**Next\_Cell\_Location\_of\_W** will be one of **(i ± 1, j ± 1)** or **(i ± 1, j)** or **(i, j ± 1)**
**5.** W will win if W defeats Y such that **Power\_of\_Y = 1**, otherwise W is defeated.
**What to code** You have to code to verify whether W wins or get defeated but don't forget the followings -
**1.** The one cell location is of W and other cell locations are of Yavanas
**2.** Its up to W to choose the Yavana warrior Y to fight with
**3.** Its not necessary that W has to defeat all Yavanas, **W just want to win**
**\[All the information required to solve this problem is provided in the description\]**
Input Format
First line of input is t, total number of test cases (t < 1001). Next t lines contains value of
N (2 < N < 1000).
Output Format
Output for each test case is single line printing either **DWON Final\_Power\_of\_W** (If W wins) or **DDOWN** (If W is defeated).