#include using namespace std; // OM NAMAH SHIVAY #define IOS ios::sync_with_stdio(0);cin.tie(0);cout.tie(0); #define endl "\n" #define int long long #define F first #define S second #define all(x) (x).begin(), (x).end() const int inf = 1e18; // int dx[4]={-1,0,1,0}; // int dy[4]={0,1,0,-1}; // int dx[8]={0,-1,-1,-1,0,1,1,1}; // int dy[8]={1,1,0,-1,-1,-1,0,1}; const int N = 200200; const int mod = 1e9+7; using ii = pair; void solver(){ int n;cin>>n; string s;cin>>s; vectorp(n); for(int i=0;i>p[i]; string t=""; for(auto x:p) { t+=s[x-1]; } cout<>_t;while(_t--) solver(); return 0; } #undef int