#include <bits/stdc++.h>
using namespace std;
const int modul = 1000000007;
const int nmax = 100010;
const double e = 1e-8;
const double pi = acos(-1);
int n, m, stest;
struct cs {
  int t, a, b;
};
cs s[nmax];
long long leng;
vector<int> res;
void Process(int i) {
  if (s[i].t == 1) {
    leng++;
    if ((int)res.size() < nmax) res.push_back(s[i].a);
  } else {
    leng += s[i].a * s[i].b;
    for (int u = 1; u <= s[i].b; u++) {
      for (int v = 1; v <= s[i].a; v++)
        if ((int)res.size() < nmax)
          res.push_back(res[v]);
        else
          break;
      if ((int)res.size() == nmax) break;
    }
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin >> m;
  res.clear();
  for (int i = 1; i <= m; i++) {
    cin >> s[i].t;
    if (s[i].t == 1)
      cin >> s[i].a;
    else
      cin >> s[i].a >> s[i].b;
  }
  cin >> n;
  leng = 0;
  int cur = 1;
  res.push_back(0);
  for (int i = 1; i <= n; i++) {
    long long u;
    cin >> u;
    while (leng < u) {
      Process(cur);
      cur++;
    }
    if (s[cur - 1].t == 1)
      cout << s[cur - 1].a << " ";
    else {
      long long pos = (u - (leng - s[cur - 1].a * s[cur - 1].b)) % s[cur - 1].a;
      if (pos == 0) pos = s[cur - 1].a;
      cout << res[pos] << " ";
    }
  }
  return 0;
}
