#include <iostream>
using namespace std;
int main() {
int t;
cin>>t;
while(t--){
int n;
cin>>n;
int first_element;
cin>>first_element;
for(int i=1;i<n;i++){
int temp;
cin>>temp;
}
cout<<first_element<<endl;
}
return 0;
}
// 64 位输出请用 printf("%lld")



京公网安备 11010502036488号