#include <iostream>
using namespace std;
int main() {
int tab[100];
for(int i=0;i<100;i++) {
cin >> tab[i];
}
int q;
cin >> q;
for (int i = 0; i < q; ++i) {
int k;
cin >> k;
cout << tab[k - 1] << endl;
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CgkKCWludCB0YWJbMTAwXTsKCQoJZm9yKGludCBpPTA7aTwxMDA7aSsrKSB7CgkJY2luID4+IHRhYltpXTsKCX0KCQoJaW50IHE7CgljaW4gPj4gcTsKCQoJZm9yIChpbnQgaSA9IDA7IGkgPCBxOyArK2kpIHsKICAgICAgICBpbnQgazsKICAgICAgICBjaW4gPj4gazsKICAgICAgICBjb3V0IDw8IHRhYltrIC0gMV0gPDwgZW5kbDsKICAgIH0KCglyZXR1cm4gMDsKfQ==
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