#include <bits/stdc++.h>
using namespace std;
const int N = 100005;
struct order {
  int s;
  long long x, y;
} o[N];
int n, m, num[N], ans[N], c, cnt;
long long k[N];
void handle() {
  c = 0;
  for (int i = 0; i < m; i++) {
    if (o[i].s == 1) {
      num[c++] = o[i].x;
      if (c >= 100000) return;
    } else {
      for (long long t = 0; t < o[i].y; t++) {
        for (long long j = 0; j < o[i].x; j++) {
          num[c++] = num[j];
          if (c >= 100000) return;
        }
      }
    }
  }
}
void init() {
  scanf("%d", &m);
  for (int i = 0; i < m; i++) {
    scanf("%d", &o[i].s);
    if (o[i].s == 1)
      cin >> o[i].x;
    else
      cin >> o[i].x >> o[i].y;
  }
  handle();
  scanf("%d", &n);
  for (int i = 0; i < n; i++) cin >> k[i];
}
void solve() {
  int i = 0, j = 0;
  long long p = 0;
  while (i < n) {
    while (j < m) {
      if (o[j].s == 1) {
        p++;
        j++;
        if (p == k[i]) {
          ans[i] = o[j - 1].x;
          i++;
          if (i >= n) return;
          break;
        }
      } else {
        long long q = p;
        p += o[j].x * o[j].y;
        if (p >= k[i]) {
          while (i < n) {
            if (k[i] <= p) {
              ans[i] = num[(k[i] - q - 1) % o[j].x % 100000];
              i++;
              if (i >= n) return;
            } else {
              j++;
              break;
            }
          }
        } else
          j++;
      }
    }
  }
}
int main() {
  init();
  solve();
  printf("%d", ans[0]);
  for (int i = 1; i < n; i++) printf(" %d", ans[i]);
  printf("\n");
  return 0;
}
