#include <iostream>
using namespace std;
int main() {
int tab[101];
for(int i=1;i<=100;i++)cin>>tab[i];
int t;
cin>>t;
while(t--)
{
int x;
cin>>x;
cout<<tab[x]<<endl;
}
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CglpbnQgdGFiWzEwMV07Cglmb3IoaW50IGk9MTtpPD0xMDA7aSsrKWNpbj4+dGFiW2ldOwoJaW50IHQ7CgljaW4+PnQ7Cgl3aGlsZSh0LS0pCgl7CgkJaW50IHg7CgkJY2luPj54OwoJCWNvdXQ8PHRhYlt4XTw8ZW5kbDsKCX0KfQ==
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