// Bismillah #include #define ll long long #define nl "\n" #define vi vector #define vll vector #define vvi vector> #define vvl vector> #define pii pair #define pll pair #define pb push_back #define mp make_pair #define ff first #define ss second #define all(v) v.begin(), v.end() #define rall(v) v.rbegin(), v.rend() #define mod 1000000007 #define print(a) for(auto it: a) cout << it << " " << endl; #define forn(a,n) for(int i = a ; i < n ; i++) #define io ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); using namespace std; void solve() { int x; cin >> x; string s; cin >> s; int arr[x]; forn(0,x){ int l; cin >> l; --l; arr[i] = l; } forn(0, x ){ cout << s[arr[i]]; } } signed main() { io; // freopen("input.txt", "r", stdin); // freopen("output.txt", "w", stdout); int t = 1; // cin >> t; // auto st = chrono::high_resolution_clock::now(); forn(1, t + 1) { // cout << "Case #" << i << ": "; solve(); nl; } // cerr << "Time: " << (ld)(chrono::duration_cast( // chrono::high_resolution_clock::now() - st).count()) / 1000.0 << "s"; return 0; }