Teacher Suki loves her students very much. Now, she wants to distribute toffees among her students. She has a bag full of toffees. Since, she doesn't have time for counting, each time she randomly picks up some toffees from the bag and gives them to a student. Now, she doesn't want to be called a bad teacher, so she wants the toffees to be equally distributed as far as possible. She will be called a bad teacher if any student gets at least two toffees more than any other student. Otherwise, she will be called a good teacher.

Given the number of students and the number of toffees each student gets, can you say whether we should call her a bad teacher?
 

Input

First line contains t, the number of test cases. The first line of each test case contains n, the number of students. The next line consists of n space separated numbers xi (1 <= i <= n), denoting the number of toffees i^th student gets.

 

Output

Print  “GOOD” (without quotes), if Teacher Suki can be called a good teacher, print  “BAD” (without quotes) otherwise. Print each answer in a new line.

 

Constraints

 1 <= t <= 100 
 1 <= n <= 10^ 5 
1 <= xi <= 10^ 9 

 

Example
Input:

2
3
2 2 1
3
1 5 4

Output:


GOOD
BAD
tc=int(raw_input())
for i in xrange(tc):
    n=int(raw_input())
    choco=map(int,raw_input().split())
    mi=min(choco)
    ma=max(choco)
    if ma-mi >=2:
        print "BAD"
    else:
        print "GOOD"