#include <bits/stdc++.h>
using namespace std;
struct N {
  int flag;
  long long l, c;
} p[100005];
int op;
long long ans[100005];
int m, n;
long long l, c;
long long wei[100005];
long long pre[100005];
int main() {
  cin >> m;
  int cnt = 1;
  for (int i = 1; i <= m; i++) {
    scanf("%d", &op);
    if (op == 1) {
      scanf("%I64d", &l);
      p[i].flag = op;
      p[i].l = l;
      if (cnt <= 100000) pre[cnt++] = l;
    } else {
      scanf("%I64d%I64d", &l, &c);
      p[i].flag = op;
      p[i].l = l;
      p[i].c = c;
      if (cnt <= 100000)
        for (int j = 1; j <= (int)c; j++) {
          if (cnt > 100000) break;
          for (int k = 1; k <= (int)l; k++) {
            pre[cnt++] = pre[k];
            if (cnt > 100000) break;
          }
        }
    }
  }
  cin >> n;
  for (int i = 1; i <= n; i++) scanf("%I64d", &wei[i]);
  int t = 0, tt = 1;
  long long fa = 0LL;
  for (int i = 1; i <= m; i++) {
    if (p[i].flag == 1) {
      fa += 1LL;
      if (fa == wei[tt]) {
        ans[t++] = p[i].l;
        tt++;
        if (t >= n) break;
      }
    } else {
      fa += p[i].c * p[i].l;
      while (fa >= wei[tt]) {
        long long bb = wei[tt] - (fa - p[i].c * p[i].l);
        bb %= p[i].l;
        if (bb == 0LL) bb = p[i].l;
        ans[t++] = pre[(int)bb];
        tt++;
        if (t >= n) break;
      }
    }
    if (t >= n) break;
  }
  for (int i = 0; i < n; i++) {
    if (i < n)
      printf("%I64d ", ans[i]);
    else
      printf("%I64d\n", ans[i]);
  }
  return 0;
}
