题目描述
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
输入格式
见题面
输出格式
见题面