#include <bits/stdc++.h>
using namespace std;
vector<pair<long long, long long> > Q;
long long a[100 * 1000 + 5];
vector<long long> P;
int main() {
  int m, n;
  cin >> m;
  for (int i = 0; i < m; i++) {
    int t;
    cin >> t;
    if (t == 1) {
      int x;
      cin >> x;
      Q.push_back(pair<long long, long long>(x, -1));
    } else {
      int c, l;
      cin >> l >> c;
      Q.push_back(pair<long long, long long>(l, c));
    }
  }
  int pos = 0;
  while (P.size() < 100000 && pos < (int)Q.size()) {
    pair<long long, long long> t = Q[pos];
    if (t.second == -1)
      P.push_back(t.first);
    else {
      bool b = false;
      for (int i = 0; i < t.second && !b; i++)
        for (int j = 0; j < t.first; j++) {
          P.push_back(P[j]);
          if (P.size() > 100000) {
            b = true;
            break;
          }
        }
    }
    pos++;
  }
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    a[i]--;
  }
  int pos1 = 0;
  long long len = 0, last = 0;
  for (int i = 0; i < m; i++) {
    if (Q[i].second == -1)
      len += 1ll;
    else
      len += Q[i].first * Q[i].second;
    while (pos1 < n && a[pos1] < len) {
      if (Q[i].second == -1)
        printf("%d ", Q[i].first);
      else {
        long long e = a[pos1] - last;
        e %= Q[i].first;
        printf("%d ", P[e]);
      }
      pos1++;
    }
    last = len;
  }
  printf("\n");
  return 0;
}
