#include <bits/stdc++.h>
using namespace std;
long long l, c, x, n, m, i, j, ml = 100000, a[100010], k, b, d, pos;
vector<long long> de, p, lx;
int main() {
  cin >> m;
  x = 1;
  for (i = 1; i <= m; i++) {
    cin >> d;
    if (d == 1) {
      cin >> l;
      if (x <= ml)
        a[x] = l;
      else {
        de.push_back(1);
        p.push_back(x);
        lx.push_back(l);
      }
      x++;
    } else {
      cin >> l >> c;
      b = x;
      for (j = 1; j <= c && x <= ml; j++)
        for (k = 1; k <= l && x <= ml; k++) {
          a[x] = a[k];
          x++;
        }
      if (x > ml) {
        de.push_back(2);
        p.push_back(b);
        lx.push_back(l);
      }
      x = b + l * c;
    }
  }
  cin >> n;
  i = 0;
  for (k = 1; k <= n; k++) {
    cin >> pos;
    if (pos <= ml)
      cout << a[pos] << " ";
    else {
      while (i < p.size() - 1 && p[i + 1] <= pos) i++;
      if (de[i] == 1)
        cout << lx[i] << " ";
      else {
        pos = pos - p[i];
        pos = (pos % lx[i]) + 1;
        cout << a[pos] << " ";
      }
    }
  }
  return 0;
}
