#include <bits/stdc++.h>
using namespace std;
class X {
 public:
  unsigned long long pos;
  unsigned long long end;
  int val;
  bool type;
};
vector<X> steps(100100);
int l[100100];
int main() {
  unsigned long long n, m, t, x, c, pos = 0, cpos = 0, temp;
  cin >> n;
  for (unsigned long long i = 0; i < n; i++) {
    cin >> t;
    if (t == 1) {
      cin >> x;
      steps[i].pos = pos;
      steps[i].end = pos + 1;
      steps[i].val = x;
      pos++;
    } else {
      cin >> x >> c;
      steps[i].pos = pos;
      steps[i].end = pos + x * c;
      steps[i].val = x;
      pos += x * c;
    }
    steps[i].type = t - 1;
  }
  cin >> m;
  unsigned long long j = 0;
  while (cpos <= 100000 && j < n) {
    if (steps[j].type == 0) {
      if (cpos <= 100000) l[cpos++] = steps[j].val;
    } else {
      unsigned long long k = 0;
      while (cpos <= 100000 && cpos < steps[j].end) {
        l[cpos++] = l[k % steps[j].val];
        k++;
      }
    }
    j++;
  }
  j = 0;
  for (int i = 0; i < m; i++) {
    cin >> temp;
    while (j < n && steps[j].end < temp) {
      j++;
    }
    if (steps[j].type == 0) {
      cout << steps[j].val << " ";
    } else {
      cout << l[(temp - steps[j].pos - 1) % steps[j].val] << " ";
    }
  }
  cout << endl;
  return 0;
}
