#include <bits/stdc++.h>
using namespace std;
template <typename T1, typename T2>
ostream& operator<<(ostream& out, pair<T1, T2> pair) {
  out << "(" << pair.first << ", " << pair.second << ")";
  return out;
}
const int MAXN = 100100;
const int MAXL = 100100;
int last;
long long ask[MAXN];
int op[MAXN], l[MAXN], c[MAXN];
int n, m;
int val[MAXN];
int main() {
  ios_base::sync_with_stdio(false);
  cin >> m;
  for (int i = 0; i < (m); ++i) {
    cin >> op[i] >> l[i];
    if (op[i] == 1) {
      if (last > MAXN - 10) continue;
      val[last++] = l[i];
    } else {
      cin >> c[i];
      for (int x = 0; x < (l[i] * c[i]); ++x) {
        if (last > MAXN - 10) break;
        val[last++] = val[x % l[i]];
      }
    }
  }
  cin >> n;
  for (int i = 0; i < (n); ++i) {
    cin >> ask[i];
    --ask[i];
  }
  int nex = 0;
  long long cur = 0;
  for (int i = 0; i < (m); ++i) {
    if (nex == n) break;
    if (op[i] == 1) {
      while (ask[nex] == cur) {
        if (nex == n) break;
        cout << l[i] << ' ';
        ++nex;
      }
      cur++;
    } else {
      while (ask[nex] < cur + c[i] * l[i]) {
        if (nex == n) break;
        cout << val[(ask[nex] - cur) % l[i]] << ' ';
        ++nex;
      }
      cur += c[i] * l[i];
    }
  }
  cout << endl;
  return 0;
}
