For this Question: John and Olivia once start fighting when Olivia sees John talking with another girl. So, you tell them to play the game of love in which you give them an array A of size N. Now, the game will play in turns in which a player must decrease the value at the smallest index (with a non-zero value) in A by x (x > 0). The player who cannot make a move will lose the game.
You being a loyal friend of Olivia, wants her to win. So, tell Olivia whether she should move first or second to win this game.
Assume both players will play optimally at every step of the game.The first line contains a single integer T (1 ≤ T ≤ 1000) — the number of test cases.

The first line of each test case contains a single integer N (1 ≤ N ≤ 100) — the size of the array A on which the game is to be played.
.
The second line contains n integers A<sub>1</sub>, A<sub>2</sub>, …, A<sub>N</sub> (1 ≤ A<sub>i</sub> ≤ 10<sup>9</sup>).For each test case, print on a new line whether Olivia should move "first" or "second" (without quotes) to win the game.Sample Input:
2
3
2 1 3
2
1 1

Sample Output:
first
second

Sample Explanation:
For the first test case, Olivia will remove 2 from the 1st index, then John has to remove 1 from the 2nd index, and finally, Olivia will remove 3 from the 3rd index.
For the second test case, John has to remove 1 from the 1st index, then Olivia removes 1 from the 2nd index., I have written this Solution Code: #include<bits/stdc++.h>
using namespace std;

int main(){
	int t;
	cin >> t;
	while(t--){
		int n;
		cin >> n;
		vector<int> v(n);
		bool ok=1;
		for(auto &i:v) cin >> i;
		int ans=1;
		for(auto i:v){
			if(i!=1) ok=0;
			if(i==1) ans^=1;
			else break;
		}
		if(!ok){
			if(ans){
				cout << "first\n";
			}else{
				cout << "second\n";
			}
		}else{
			if(n&1){
				cout << "first\n";
			}else{
				cout << "second\n";
			}
		}
	}
}, In this Programming Language: C++, Now tell me if this Code is compilable or not?