#include <bits/stdc++.h>
using namespace std;
int GCD(int a, int b) {
  if (!a) return b;
  return GCD(b % a, a);
}
void init() {}
long long first[300009], second[300009];
pair<int, int> val[300009];
int main() {
  clock_t startTime = clock();
  init();
  ios_base::sync_with_stdio(false);
  int m;
  cin >> m;
  long long f = 1;
  int in = 0;
  for (int i = (0); i < (int)(m); i++) {
    int type;
    cin >> type;
    if (type == 1) {
      int x;
      cin >> x;
      first[in] = f;
      second[in] = f;
      val[in] = make_pair(x, 0);
      in++;
      f++;
    } else {
      int l, c;
      cin >> l >> c;
      first[in] = f;
      long long e = f + (long long)l * (long long)c - 1;
      second[in] = e;
      val[in] = make_pair(l, -1);
      in++;
      f = e + 1;
    }
  }
  int n;
  cin >> n;
  vector<int> ans;
  ans.reserve(n);
  while (n--) {
    long long idx;
    cin >> idx;
    while (1) {
      int xi = lower_bound(second, second + in, idx) - second;
      pair<int, int> tmp = val[xi];
      if (val[xi].second == 0) {
        ans.push_back(val[xi].first);
        break;
      } else {
        long long cursz = second[xi] - first[xi] + 1;
        int rep = val[xi].first;
        int box = (idx - first[xi]) / rep;
        idx = (idx - first[xi]) % rep + 1;
      }
    }
  }
  for (int i = (0); i < (int)(ans.size()); i++) cout << ans[i] << " ";
  clock_t endTime = clock();
  return 0;
}
