#include <bits/stdc++.h>
using namespace std;
void solve() {
    int n, x;
    cin >> n >> x;
    set<int> s;
    for (int i = 0; i < n; i++) {
        int a;
        cin >> a;
        s.insert(a);
    }
    if (s.size() == x) cout << "Good\n";
    else if (s.size() < x) cout << "Bad\n";
    else cout << "Average\n";
}
int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int t;
    cin >> t;
    while (t--) solve();
    return 0;
}