#include <bits/stdc++.h>
using namespace std;
const int MAXT = 100100;
int N, M;
int seq[2 * MAXT];
vector<pair<int, int> > s;
long long ssize;
int main() {
  ios_base::sync_with_stdio(0);
  ssize = 0;
  cin >> M;
  for (int i = 0; i < M; i++) {
    int type;
    cin >> type;
    if (type == 1) {
      int x;
      cin >> x;
      if (ssize < MAXT) seq[ssize] = x;
      s.push_back(make_pair(-1, x));
      ssize++;
    } else {
      long long l, c;
      cin >> l >> c;
      if (ssize < MAXT) {
        for (int i = ssize; i < min((long long)MAXT, ssize + l * c); i++)
          seq[i] = seq[(i - ssize) % l];
      }
      s.push_back(make_pair(l * c, l));
      ssize += l * c;
    }
  }
  int N;
  cin >> N;
  long long ctot = 0;
  int cloc = 0;
  for (int i = 0; i < N; i++) {
    long long t;
    cin >> t;
    t--;
    while (ctot + abs(s[cloc].first) <= t) {
      ctot += abs(s[cloc].first);
      cloc++;
    }
    if (s[cloc].first == -1)
      cout << s[cloc].second;
    else
      cout << seq[(t - ctot) % (long long)s[cloc].second];
    if (i < N - 1) cout << " ";
  }
  cout << "\n";
  return 0;
}
