#include <bits/stdc++.h>
using namespace std;
void IOS() {
  ios::sync_with_stdio(false);
  cout.precision(10);
  cout << fixed;
}
const long long MOD = 1e9 + 7;
const long long mx = 1e5 + 5;
long long i, j, k;
struct node {
  long long t;
  long long v;
  long long l, c;
} arr[(long long)1e5 + 1];
long long szs[(long long)1e5 + 1];
int32_t main() {
  IOS();
  long long n;
  cin >> n;
  for (long long i = 1; i <= n; i++) {
    cin >> arr[i].t;
    if (arr[i].t == 1) {
      cin >> arr[i].v;
      szs[i] = 1;
    } else {
      cin >> arr[i].l >> arr[i].c;
      szs[i] = arr[i].l * arr[i].c;
    }
  }
  for (long long i = 1; i <= n; i++) {
    szs[i] += szs[i - 1];
  }
  long long m;
  cin >> m;
  while (m--) {
    long long q;
    cin >> q;
    long long i = lower_bound(szs, szs + n + 1, q) - szs;
    while (arr[i].t == 2) {
      q -= szs[i - 1];
      q = ((q - 1) % arr[i].l) + 1;
      i = lower_bound(szs, szs + n + 1, q) - szs;
    }
    cout << arr[i].v << " ";
  }
  cout << "\n";
  return 0;
}
