#include using namespace std; int main () { int N; cin >> N; string s; cin >> s; while (N--) { int a; cin >> a; cout << s[--a]; } cout << endl; }