Any questions do not hesitate to contact.
#include<bits/stdc++.h>
using namespace std;
int main()
{
int t,n;
string s;
cin>>t;
while(t--)
{
cin>>n>>s;
n=s.length()-1;
cout<<s[n]<<endl;
}
return 0;
}
Keep in touch with Isaac Lozano Osorio!