#include<iostream>
#define ll long long
using namespace std;
ll T,X,Y,P,Q,a,b,c,k1,k2,tans;
ll exgcd(ll a,ll b,ll &x,ll &y) {
	if(!b) {
		x=1,y=0;
		return a;
	}
	int t=exgcd(b,a%b,y,x);
	y-=a/b*x;
	return t;
}
int main() {
	cin>>T;
	while(T--) {
		cin>>X>>Y>>P>>Q;
		a=2*X+2*Y,b=P+Q;
		tans=5e18;
		for(int q=0; q<Q; q++) {
			for(int y=0; y<Y; y++) {
				c=P+q-X-y;
				int t=exgcd(a,b,k1,k2);
				if(c%t)continue;

				k1=k1*c/t;
				k1=(k1%(b/t)+(b/t))%(b/t);
				tans=min(tans,a*k1+y+X);
			}
		}
		if(tans==5e18)cout<<"infinity\n";
		else cout<<tans<<endl;
	}
}
#include<bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>

// using namespace __gnu_pbds;
using namespace std;

#define fbo find_by_order
#define ook order_of_key
#define fi first
#define se second
#define long long long
#define mul(a, b) ((a*b)%MOD)
#define add(a, b) ((a+b)%MOD)
#define dec(a, b) ((a-b+MOD)%MOD)
typedef pair<int,int> ii;
typedef pair<int,ii> iii;
typedef vector<int> vi;
typedef vector<ii> vii;
const int INF = 1e9;
const long LINF = 1e18;
// typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;
// mt19937_64 rng(std::chrono::system_clock::now().time_since_epoch().count());
// inv[1] = 1;
// fac[0] = ifac[0] = 1;
// for(int i = 2; i <= 500000; i++) inv[i]=MOD-(MOD/i)*inv[MOD%i]%MOD;
// for(int i = 1; i <= 500000; i++) fac[i] = mul(i, fac[i-1]), ifac[i] = mul(inv[i], ifac[i-1]);
// /mnt/c/Users/vince/Desktop/POST-IOI/  

map<int,int> cnt;
int A[100003];

int main()
{
	// ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
	// freopen("input.in", "r", stdin);

	int t; scanf("%d", &t);
	while(t--)
	{
		int n; scanf("%d", &n);
		for(int i = 1; i <= n; i++)
		{
			scanf("%d", &A[i]);
		}
		if(n&1)
		{
			printf("Second\n");
		}
		else
		{
			cnt.clear();
			for(int i = 1; i <= n; i++)
				cnt[A[i]]++;

			bool bol = 1;
			for(auto it : cnt)
				if(it.se&1)
					bol = 0;
			if(bol) printf("Second\n");
			else printf("First\n");
		}	
	}
}



