#include <bits/stdc++.h>
using namespace std;
int mod1 = int(1e9) + 7;
vector<long long> len;
int ca[100005], la[100005];
int ex[100005];
int main() {
  int m;
  scanf("%d", &m);
  long long l = 0;
  long long pos = 0;
  for (int i = 0; i < (int)(m); ++i) {
    int t;
    scanf("%d", &t);
    if (t == 1) {
      int c;
      scanf("%d", &c);
      l++;
      len.push_back(l);
      ca[i] = c;
      if (pos < 100005) {
        ex[pos] = c;
        pos++;
      }
    }
    if (t == 2) {
      long long li, ci;
      scanf("%I64d%I64d", &li, &ci);
      l += li * ci;
      len.push_back(l);
      la[i] = li;
      if (pos < 100005) {
        for (int a = 0; a < (int)(ci); ++a) {
          for (int b = 0; b < (int)(li); ++b) {
            if (pos >= 100005) break;
            ex[pos] = ex[b];
            pos++;
          }
          if (pos >= 100005) break;
        }
      }
    }
  }
  int n;
  scanf("%d", &n);
  for (int i = 0; i < (int)(n); ++i) {
    long long x;
    scanf("%I64d", &x);
    auto it = lower_bound((len).begin(), (len).end(), x);
    int id = it - len.begin();
    if (ca[id] > 0) {
      printf("%d ", ca[id]);
      continue;
    }
    x -= len[id - 1];
    x--;
    x %= la[id];
    printf("%d ", ex[x]);
  }
  printf("\n");
  return 0;
}
