#include <bits/stdc++.h>
using namespace std;
static constexpr int MAXN = 1e5;
struct stage {
  int type, value;
};
int as[MAXN];
map<long long, stage> stages;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int m;
  cin >> m;
  long long end = 0;
  for (int i = 0; i < m; ++i) {
    int type;
    cin >> type;
    if (type == 1) {
      int x;
      cin >> x;
      if (end < MAXN) as[end] = x;
      stages[end] = {1, x};
      ++end;
    } else {
      int l, c;
      cin >> l >> c;
      long long new_end = end + l * c;
      if (end < MAXN)
        for (int j = 0; j < c && end < MAXN; ++j)
          for (int k = 0; k < l && end < MAXN; ++k) as[end++] = as[k];
      end = new_end;
      stages[end - 1] = {2, l};
    }
  }
  int n;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    long long j;
    cin >> j;
    --j;
    auto it = stages.lower_bound(j);
    if (it->second.type == 1)
      cout << it->second.value << ' ';
    else {
      long long diff = j - prev(it)->first - 1;
      cout << as[diff % it->second.value] << ' ';
    }
  }
  cout << '\n';
  return 0;
}
