#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define F first
#define S second
const int mod = 1e9+7;
const int N = 2e5+10;
int main ()
{
    //cin.tie(0);cout.tie(0);ios::sync_with_stdio(false);
    int t , n , arr[N];
    cin >> t;
    while(t--)
    {
        ll ans = 0;
        cin >> n;
        for (int i = 0 ; i < n ; ++i)
        {
            cin >> arr[i];
            ans ^= arr[i];
        }
        if (ans > 0)
            cout << "first\n";
        else
            cout << "second\n";
    }

return 0;
}
