import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            int x = sc.nextInt();
            while (x-- > 0) {
                int n = sc.nextInt();
                int m = sc.nextInt();
                int y = sc.nextInt();
                double sum = 0;
                for (int i = 0; i < n; i++) {
                    sum += sc.nextInt();
                }
                double res1 = sum / (m + n);
                sum = 0;
                for (int i = 0; i < m; i++) {
                    sum += sc.nextInt();
                }
                double res2 = sum / (m + n);
                double res = (res1 + res2) / (1 - (m * 1.0) / (m + n));
                if (res <= y)
                    System.out.println("Go");
                else
                    System.out.println("Wait");
            }
        }
    }
}