#include <bits/stdc++.h>
using namespace std;
long long m, t[100005], l[100005], c[100005], x[100005];
long long n, q[100005];
vector<long long> a;
int main() {
  cin.tie(NULL);
  cin >> m;
  for (long long i = 0; i < m; i++) {
    cin >> t[i];
    if (t[i] == 1) {
      cin >> x[i];
      if (a.size() < 100000) a.push_back(x[i]);
    } else {
      cin >> l[i] >> c[i];
      for (long long z = 0; z < c[i]; z++) {
        for (long long j = 0; j < l[i]; j++) {
          a.push_back(a[j]);
          if (a.size() >= 100000) break;
        }
        if (a.size() >= 100000) break;
      }
    }
  }
  cin >> n;
  for (long long i = 0; i < n; i++) {
    cin >> q[i];
    q[i]--;
  }
  long long z = 0, len = 0;
  for (long long i = 0; i < m; i++) {
    if (t[i] == 1) {
      for (; z < n and q[z] == len; z++) cout << x[i] << ' ';
      len++;
    } else {
      for (; z < n and q[z] < len + l[i] * c[i]; z++) {
        cout << a[(((q[z] - len + 1) % l[i]) + l[i] - 1) % l[i]] << ' ';
      }
      len += l[i] * c[i];
    }
  }
  return 0;
}
