#include using namespace std; int main() { int N; string S; cin >> N >> S; for (int i = 0; i < N; i++) { int P; cin >> P; P--; cout << S[P]; } }