#include <bits/stdc++.h>
using namespace std;
int main() {
int t;
cin >> t;
while(t--){
int n,x;
cin >> n;
vector<int> a;
for(int i=0;i<n;i++){
cin >> x;
if(i == 0 || i % 2 == 0) a.push_back(x);
}
cout << *max_element(a.begin(),a.end()) << endl;
}
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgppbnQgbWFpbigpIHsKCWludCB0OwoJY2luID4+IHQ7Cgl3aGlsZSh0LS0pewoJCWludCBuLHg7CgkJY2luID4+IG47CgkJdmVjdG9yPGludD4gYTsKCQlmb3IoaW50IGk9MDtpPG47aSsrKXsKCQkJY2luID4+IHg7CgkJCWlmKGkgPT0gMCB8fCBpICUgMiA9PSAwKQlhLnB1c2hfYmFjayh4KTsKCQl9CgkJY291dCA8PCAqbWF4X2VsZW1lbnQoYS5iZWdpbigpLGEuZW5kKCkpIDw8IGVuZGw7Cgl9CglyZXR1cm4gMDsKfQ==