#include <bits/stdc++.h>
const long long mod = 1000 * 1000 * 1000 + 7;
const long long mod1 = 998244353;
const long long INF = 1ll * 1000 * 1000 * 1000 * 1000 * 1000 * 1000 + 7;
using namespace std;
long long power(long long x, long long y) {
  long long res = 1;
  while (y > 0) {
    if (y & 1) res = (long long)(res * x);
    y = y >> 1;
    if (x <= 100000000) x = (long long)(x * x);
  }
  return res;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  vector<long long> a;
  vector<long long> b;
  vector<long long> c;
  vector<long long> d;
  long long m;
  cin >> m;
  long long x, y, z;
  long long cnt = 1;
  while (m--) {
    cin >> x;
    if (x == 1) {
      cin >> y;
      if (cnt <= 100005) b.push_back(y);
      a.push_back(cnt);
      c.push_back(y);
      d.push_back(-1);
      cnt += 1;
    } else {
      cin >> y >> z;
      a.push_back(cnt);
      c.push_back(y);
      d.push_back(z);
      if (cnt <= 100005) {
        for (int i = 1; i <= z; i++) {
          for (int j = 0; j < y; j++) {
            if (cnt <= 100005) b.push_back(b[j]);
            cnt += 1;
          }
        }
      } else {
        cnt += y * z;
      }
    }
  }
  long long n;
  cin >> n;
  long long s;
  for (int(i) = (0); (i) < (n); ++(i)) {
    cin >> s;
    long long pos;
    pos = upper_bound(a.begin(), a.end(), s) - a.begin();
    pos -= 1;
    if (d[pos] == -1)
      cout << c[pos] << ' ';
    else {
      long long rem = s - a[pos];
      rem %= c[pos];
      cout << b[rem] << ' ';
    }
  }
  return 0;
}
