#include <bits/stdc++.h>
using namespace std;
struct lwd {
  long long A, x, y;
} a[100010];
struct que {
  long long x, id;
} ask[100010];
long long m, n, ans[100010], len, vis[100010], tmp;
long long read() {
  long long f = 1, k = 0;
  char c = getchar();
  while (c < '0' || c > '9') c == '-' && (f = -1), c = getchar();
  while (c >= '0' && c <= '9') k = k * 10 + c - '0', c = getchar();
  return k * f;
}
bool cmp(que x, que y) { return x.x < y.x; }
int main() {
  m = read();
  for (int i = 1; i <= m; i++) {
    a[i].A = read();
    a[i].x = read();
    if (a[i].A == 2) a[i].y = read();
  }
  n = read();
  int now = 1;
  for (int i = 1; i <= n; i++) ask[i].x = read(), ask[i].id = i;
  sort(ask + 1, ask + n + 1, cmp);
  for (int i = 1; i <= m; i++) {
    if (a[i].A == 1) {
      len++;
      while (ask[now].x <= len && now <= n) {
        ans[ask[now].id] = a[i].x;
        now++;
      }
      if (len <= 100000) vis[len] = a[i].x;
    } else {
      tmp = len;
      for (int k = 1; k <= a[i].y; k++) {
        for (int j = 1; j <= a[i].x; j++) {
          len++;
          if (len > 100000) break;
          vis[len] = vis[j];
        }
        if (len > 100000) break;
      }
      len = tmp + a[i].x * a[i].y;
      while (ask[now].x <= len && now <= n) {
        ans[ask[now].id] =
            vis[(ask[now].x - tmp) % a[i].x == 0 ? a[i].x
                                                 : (ask[now].x - tmp) % a[i].x];
        now++;
      }
    }
  }
  for (int i = 1; i <= n; i++) printf("%lld ", ans[i]);
  return 0;
}
