Koa the Koala and her best friend want to play a game.

The game starts with an array a of length n consisting of non-negative integers. Koa and her best friend move in turns and each have initially a score equal to 0. Koa starts.

Let's describe a move in the game:

  * During his move, a player chooses any element of the array and removes it from this array, xor-ing it with the current score of the player.

More formally: if the current score of the player is x and the chosen element is y, his new score will be x ⊕ y. Here ⊕ denotes [bitwise XOR operation](https://en.wikipedia.org/wiki/Bitwise_operation#XOR).

Note that after a move element y is removed from a.

  * The game ends when the array is empty. 



At the end of the game the winner is the player with the maximum score. If both players have the same score then it's a draw.

If both players play optimally find out whether Koa will win, lose or draw the game.

Input

Each test contains multiple test cases. The first line contains t (1 ≤ t ≤ 10^4) — the number of test cases. Description of the test cases follows.

The first line of each test case contains the integer n (1 ≤ n ≤ 10^5) — the length of a.

The second line of each test case contains n integers a_1, a_2, …, a_n (0 ≤ a_i ≤ 10^9) — elements of a.

It is guaranteed that the sum of n over all test cases does not exceed 10^5.

Output

For each test case print:

  * WIN if Koa will win the game. 
  * LOSE if Koa will lose the game. 
  * DRAW if the game ends in a draw. 

Examples

Input


3
3
1 2 2
3
2 2 3
5
0 0 0 2 2


Output


WIN
LOSE
DRAW


Input


4
5
4 1 5 1 3
4
1 0 1 6
1
0
2
5 4


Output


WIN
WIN
DRAW
WIN

Note

In testcase 1 of the first sample we have:

a = [1, 2, 2]. Here Koa chooses 1, other player has to choose 2, Koa chooses another 2. Score for Koa is 1 ⊕ 2 = 3 and score for other player is 2 so Koa wins.

import java.io.IOException;
import java.io.InputStream;
import java.util.*;
public
 class TestClass {

    static final class InputReader {
        private final InputStream stream;
        private final byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        private int read() throws IOException {
            if (curChar >= numChars) {
                curChar = 0;
                numChars = stream.read(buf);
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public final int readInt() throws IOException {
            return (int) readLong();
        }

        public final long readLong() throws IOException {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
                if (c == -1) throw new IOException();
            }
            boolean negative = false;
            if (c == '-') {
                negative = true;
                c = read();
            }
            long res = 0;
            do {
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return negative ? -res : res;
        }

        public final int[] readIntArray(int size) throws IOException {
            int[] array = new int[size];
            for (int i = 0; i < size; i++) {
                array[i] = readInt();
            }
            return array;
        }

        public final long[] readLongArray(int size) throws IOException {
            long[] array = new long[size];
            for (int i = 0; i < size; i++) {
                array[i] = readLong();
            }
            return array;
        }

        public final String readString() throws IOException {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuilder res = new StringBuilder();
            do {
                res.append((char) c);
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        private boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }
    }

    static long mulmod(long a, long b,
                       long mod) {
        long res = 0; // Initialize result
        a = a % mod;
        while (b > 0) {
            // If b is odd, add 'a' to result
            if (b % 2 == 1) {
                res = (res + a) % mod;
            }

            // Multiply 'a' with 2
            a = (a * 2) % mod;

            // Divide b by 2
            b /= 2;
        }

        // Return result
        return res % mod;
    }

    static long pow(long a, long b, long MOD) {
        long x = 1, y = a;
        while (b > 0) {
            if (b % 2 == 1) {
                x = (x * y);
                if (x > MOD) x %= MOD;
            }
            y = (y * y);
            if (y > MOD) y %= MOD;
            b /= 2;
        }
        return x;
    }

    static long[] f = new long[100011];

    static long InverseEuler(long n, long MOD) {
        return pow(n, MOD - 2, MOD);
    }

    static long C(int n, int r, long MOD) {

        return (f[n] * ((InverseEuler(f[r], MOD) * InverseEuler(f[n - r], MOD)) % MOD)) % MOD;
    }


    static int[] h = {0, 0, -1, 1};
    static int[] v = {1, -1, 0, 0};


    static class Pair2 {
        public long cost;
        int node;

        public Pair2(long cos, int node) {
            this.cost = cos;
            this.node = node;
        }
    }



    static long l[][] = new long[100011][6];
    static long compute_hash(String s) {
        int p = 31;
        int m = 1000000007;
        long hash_value = 0;
        long p_pow = 1;
        for (int i = 0; i < s.length(); ++i) {
            char c = s.charAt(i);
            hash_value = (hash_value + (c - 'a' + 1) * p_pow) % m;
            p_pow = (p_pow * p) % m;
        }
        return hash_value;
    }

    public static class SegmentTree {
        int[][] tree;
        long[] sumtree;
        long[] count;
        int n;

        public SegmentTree(int[] nodes) {
            tree = new int[nodes.length * 4][31];
            sumtree = new long[nodes.length * 4];
            count = new long[nodes.length * 4];
            n = nodes.length;
            build(0, n - 1, 0, nodes);
        }

        private void build(int l, int r, int pos, int[] nodes) {
            if (l == r) {
                sumtree[pos] = nodes[l];
                boolean neg = false;
                if (nodes[l] < 0) {
                    neg = true;
                }
                count[pos] = 1;
                if (neg) {
                    count[pos] = -1;
                }
                for (int i = 0; i < 31; ++i) {
                    tree[pos][i] = (neg ? -1 : 1) * (((nodes[l] < 0 ? -1 * nodes[l] : nodes[l]) & (1 << i)) != 0 ? 1 : 0);
                }
                return;
            }
            int mid = (l + r) / 2;
            build(l, mid, 2 * pos + 1, nodes);
            build(mid + 1, r, 2 * pos + 2, nodes);
            sumtree[pos] = sumtree[2 * pos + 1] + sumtree[2 * pos + 2];
            count[pos] = count[2 * pos + 1] + count[2 * pos + 2];

            for (int i = 0; i < 31; ++i) {
                tree[pos][i] = tree[2 * pos + 1][i] + tree[2 * pos + 2][i];
            }
        }

        public long getSum(int l, int r) {
            return getSumUtil(0, n-1, 0, l, r);
        }

        private long getSumUtil(int l, int r, int pos, int ql, int qr) {
            if (l > qr || r < ql) return 0L;
            if (l >= ql && r <= qr) {
                return sumtree[pos];
            }
            int mid = (l + r) >> 1;
            return getSumUtil(l, mid, 2 * pos + 1, ql, qr) + getSumUtil(mid + 1, r, 2 * pos + 2, ql , qr);
        }

        public long getCount(int l, int r) {
            return getCountUtil(0, n-1, 0, l, r);
        }

        private long getCountUtil(int l, int r, int pos, int ql, int qr) {
            if (l > qr || r < ql) return 0L;
            if (l >= ql && r <= qr) {
                return count[pos];
            }
            int mid = (l + r) >> 1;
            return getCountUtil(l, mid, 2 * pos + 1, ql, qr) + getCountUtil(mid + 1, r, 2 * pos + 2, ql , qr);
        }

        public int[] getBitCount(int l, int r) {
            return getBitCountUtil(0, n-1, 0, l, r);
        }

        private int[] getBitCountUtil(int l, int r, int pos, int ql, int qr) {
            if (l > qr || r < ql) return null;
            if (l >= ql && r <= qr) {
                int[] returs = new int[30];
                for (int i = 0; i < 30; ++i) {
                    returs[i] =  tree[pos][i];
                }
                return returs;
            }
            int mid = (l + r) >> 1;

            int[] left = getBitCountUtil(l, mid, 2 * pos + 1, ql, qr);
            int[] right = getBitCountUtil(mid + 1, r, 2 * pos + 2, ql, qr);
            if (left == null) return right;
            if (right == null) return left;
            // int[] returs = new int[30];
            for (int i = 0; i < 30; ++i) {
                left[i] +=  right[i];
            }
            return left;
        }


    }

    static int counter = 0;
    static int[] In;
    static int[] Out;
    private static int[] flatten;
    private static int[][] lca;
    static long answer = 0;

    static int VISITED = 1;
    static int VISITING = 2;

    public static void main(String[] args) throws Exception {
        //https://i...content-available-to-author-only...e.com/ebRGa6
        InputReader in = new InputReader(System.in);

//        l[0][0] = 1;
//        for (int i = 1; i < 100008; i++) {
//            // Set every nCr = 1 where r = 0
//            l[i][0] = 1;
//            for (int j = 1; j < 5; j++) {
//
//                // Value for the current cell of Pascal's triangle
//                l[i][j] = (l[i - 1][j - 1] + l[i - 1][j]) % 1000000007;
//            }
//        }



        int t = in.readInt();

        while (t-- > 0) {
            int n = in.readInt();

            int[] a = new int[n];

            for (int i = 0; i < n; ++i) {
                a[i] = in.readInt();
            }
            int winner = 0;
            for (int bit = 30; bit >=0; --bit) {
                int count = 0;
                for (int i = 0; i < n; ++i) {
                    if  ((a[i] & (1 << bit)) != 0) {
                        count++;
                    }

                }
//                if (count == 1) {
//                    winner = 1;
//                    break;
//                }
                if (n % 2 == 1) {
                    if (count % 2 != 0) {
                        if ((1 + ((count - 1) / 2)) % 2 == 1) {
                            winner = 1;
                        } else {
                            winner = -1;
                        }
                        break;
                    }
                } else {
                    if (count % 2 != 0) {
                        if ((1 + ((count - 1) / 2)) % 2 == 1) {
                            winner = 1;
                        } else {
                            winner = 1;
                        }
                        break;
                    }
                }
            }

            if (winner == 1) {
                System.out.println("WIN");
            } else if (winner == -1) {
                System.out.println("LOSE");

            } else {

                System.out.println("DRAW");
            }
        }




    }

    private static long solve(int pos, int curK, int k, int[] arr, int m, long[][] dp) {
        System.out.println(pos);
        if (pos == arr.length) {
            if (curK == k) return 0;
            return -1000000000000L;
        }

        if (curK > k) return -1000000000000L;

        if (dp[pos][curK] != -1) return dp[pos][curK];

        long with = -1000000000000L;
        if (curK < k)
            with = solve(pos + 1, curK + 1, k, arr, m, dp) + arr[pos] * (((curK + 1) % m));
        long without = solve(pos + 1, curK, k, arr, m, dp);

        return dp[pos][curK] = Math.max(with, without);
    }

    static int countFreq(String pattern, String text) {
        int m = pattern.length();
        int n = text.length();
        int res = 0;

        for (int i = 0; i <= n - m; i++) {
            int j;
            for (j = 0; j < m; j++) {
                if (text.charAt(i + j) != pattern.charAt(j)) {
                    break;
                }
            }
            if (j == m) {
                res++;
                j = 0;
            }
        }
        return res;
    }


    private static void dfs(List<List<Integer>> g, int node, int last, int[] val, int[] traversal, int depth) {
        In[node] = counter;
        flatten[counter++] = val[node];

        traversal[depth] = node;

        for (int i = 0; depth - (1 << i) >= 0; ++i) {
            lca[node][i] = traversal[depth - (1 << i)];
        }

        for (int i = 0; i < g.get(node).size(); ++i) {
            int ntb = g.get(node).get(i);
            if (ntb != last) {
                dfs(g, ntb, node, val, traversal, depth + 1);
            }
        }

        Out[node] = counter;
        flatten[counter++] = -1 * val[node];
    }


    private static void preprocess(int pos, int[][] pre, List<List<Integer>> tree, int[] traverse, int depth, int last, int[] tin, int[] tout) {
        tin[pos] = counter++;
        traverse[depth] = pos;

        for (int i = 0; depth - (1 << i) >= 0; ++i) {
            pre[pos][i] = traverse[depth - (1 << i)];
        }

        for (int i = 0; i < tree.get(pos).size(); ++i) {
            if (tree.get(pos).get(i) != last)
                preprocess(tree.get(pos).get(i), pre, tree, traverse, depth + 1, pos, tin, tout);
        }
        tout[pos] = counter++;
    }

    static int gcd(int a, int b) {

        while (b != 0) {
            int t = a;
            a = b;
            b = t % b;
        }
        return a;
    }


    static boolean submit = true;

    static void debug(String s) {
        if (!submit)
            System.out.println(s);
    }

    static void debug(int s) {
        if (!submit)
            System.out.println(s);
    }


    class Solution {
        public class Pair {
            public int start, end, c;

            public Pair(int start, int end, int c) {
                this.start = start;
                this.end = end;
                this.c = c;
            }
        }

        public List<String> maxNumOfSubstrings(String s) {
            int n = s.length();
            List<String> answer = new ArrayList<>();
            Map<Integer, Integer> f = new HashMap<>();
            Map<Integer, Integer> l = new HashMap<>();


            for (int i = 0; i < n; ++i) {
                if (!f.containsKey(s.charAt(i) - 'a')) {
                    f.put(s.charAt(i) - 'a', i);
                }
            }

            for (int i = n - 1; i >= 0; --i) {
                if (!l.containsKey(s.charAt(i) - 'a')) {
                    l.put(s.charAt(i) - 'a', i);
                }
            }

            List<Pair> p = new ArrayList<>();
            for (int i = 0; i < 26; ++i) {
                int start = f.getOrDefault(i, -1);
                int end = l.getOrDefault(i, -1);
                if (start != -1) {
                    for (int j = start; j < end; ++j) {
                        end = Math.max(end, l.get(s.charAt(j) - 'a'));
                        if (start > f.get(s.charAt(j) - 'a')) {
                            start = Math.min(start, f.get(s.charAt(j) - 'a'));
                            j = start;
                        }

                    }
                    p.add(new Pair(start, end, i));
                }
            }

            p.sort(Comparator.comparingInt(a -> a.end));
            int lastEnd = 0;
            for (Pair pair : p) {
                if (pair.start >= lastEnd) {
                    answer.add(s.substring(pair.start, pair.end + 1));
                    lastEnd = pair.end;
                }
            }

            return answer;
        }

    }


}

































