#include <iostream>
using namespace std;
int main() {
int n,q,tab[101];
for(int i=0;i<100;i++){
cin>>tab[i];
}
cin>>n;
while(n--){
cin>>q;
cout<<tab[q]<<endl;
}
return 0;
}
CiNpbmNsdWRlIDxpb3N0cmVhbT4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKaW50IG1haW4oKSB7CiAgICBpbnQgbixxLHRhYlsxMDFdOwogICAgZm9yKGludCBpPTA7aTwxMDA7aSsrKXsKICAgICAgICBjaW4+PnRhYltpXTsKICAgIH0KICAgIGNpbj4+bjsKICAgIHdoaWxlKG4tLSl7CiAgICAgICAgY2luPj5xOwogICAgICAgIGNvdXQ8PHRhYltxXTw8ZW5kbDsKICAgIH0KICAgIHJldHVybiAwOwp9
NjUgMzcgMzkgNDUgOTQgNzkgOTEgNTkgNTYgMTIgMzAgNTYgMzIgMjEgNCA0OCA1MCA0IDQyIDQ2IDUgMzAgNzQgNjIgNDggNDMgNzAgMzYgMzcgNjMgNyA2NSA5NiA0NiA4OSA2MSA1OCAzNSAxMCAyNCA5MSA4MCAzMSA2OSAyNCA2OSA2NCAyNyAzNyA3NSA5MiA4NiA0MiA3MSA4MCAyMiAxNiAxMSAwIDgzIDExIDU2IDI4IDI5IDYyIDE3IDcyIDQ0IDQyIDcgNDcgMzQgOTAgMjIgOCA0MCA5NCAyNyA2NCA2NiAzIDE0IDEwIDE5IDc5IDg5IDQxIDgwIDczIDQ1IDQyIDcyIDg3IDEzIDEwIDU2IDYgODEgNTYgODAgCjEwCjE1CjkKMTEKMwoxOQoxMQoxNgoxCjcKOA==
65 37 39 45 94 79 91 59 56 12 30 56 32 21 4 48 50 4 42 46 5 30 74 62 48 43 70 36 37 63 7 65 96 46 89 61 58 35 10 24 91 80 31 69 24 69 64 27 37 75 92 86 42 71 80 22 16 11 0 83 11 56 28 29 62 17 72 44 42 7 47 34 90 22 8 40 94 27 64 66 3 14 10 19 79 89 41 80 73 45 42 72 87 13 10 56 6 81 56 80
10
15
9
11
3
19
11
16
1
7
8