#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
int n;
int m;
struct qry {
  int type, x, y;
} q[maxn];
long long pos[maxn];
int seq[maxn];
int pointer;
int ans[maxn];
void solve() {
  int cur = 1;
  long long len = 0;
  pointer = 1;
  for (int i = 1; i <= m; ++i) {
    int type = q[i].type;
    int x = q[i].x;
    int y = q[i].y;
    if (type == 1) {
      ++len;
      if (pointer < maxn) seq[pointer++] = x;
      if (cur <= n && pos[cur] == len) ans[cur++] = x;
    } else {
      long long LEN = len;
      len += 1LL * x * y;
      for (int k = 1; k <= y; ++k) {
        if (pointer >= maxn) break;
        for (int i = 1; i <= x; ++i) {
          if (pointer < maxn)
            seq[pointer++] = seq[i];
          else
            break;
        }
      }
      while (cur <= n && pos[cur] <= len) {
        int z = (pos[cur] - LEN) % x;
        if (!z) z = x;
        ans[cur++] = seq[z];
      }
    }
  }
}
int main() {
  scanf("%d", &m);
  for (int i = 1; i <= m; ++i) {
    int type;
    scanf("%d", &type);
    if (type == 1) {
      int x;
      scanf("%d", &x);
      q[i] = {type, x, -1};
    } else {
      int l, c;
      scanf("%d %d", &l, &c);
      q[i] = {type, l, c};
    }
  }
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%lld", &pos[i]);
  solve();
  for (int i = 1; i <= n; ++i) {
    printf("%d", ans[i]);
    if (i < n)
      printf(" ");
    else
      printf("\n");
  }
  return 0;
}
