#include <bits/stdc++.h>
using namespace std;
long long i, j, k, N, M, K, KK;
struct node {
  long long ch, ce, ct, ih, ie, ctype;
} record[1000000], tmp[1000000];
long long a[1000000], b[1000000];
void clear() {
  memset(a, 0, sizeof(a));
  memset(record, 0, sizeof(record));
  K = KK = 0;
};
void init() {
  scanf("%I64d", &M);
  for (i = 1; i <= M; i++) {
    long long t1, t2, t3, t4;
    scanf("%I64d", &t1);
    if (t1 == 1) {
      scanf("%I64d", &t2);
      record[++K].ctype = 1, record[K].ch = t2,
      record[K].ih = record[K - 1].ie + 1, record[K].ie = record[K].ih;
      if (KK <= 100000) {
        a[++KK] = t2;
      }
    } else {
      scanf("%I64d%I64d", &t2, &t3);
      record[++K].ctype = 2, record[K].ch = 1, record[K].ce = t2,
      record[K].ct = t3, record[K].ih = record[K - 1].ie + 1,
      record[K].ie = record[K].ih + (t2 * t3) - 1;
      if (KK <= 100000) {
        long long q1, q2;
        for (q1 = 1; q1 <= t3; q1++) {
          if (KK > 100000) {
            break;
          }
          for (q2 = 1; q2 <= t2; q2++) {
            if (KK > 100000) {
              break;
            }
            a[++KK] = a[q2];
          }
        }
      }
    }
    node x = record[K];
  }
  for (i = 1; i <= KK; i++) {
  }
}
void calc() {
  scanf("%I64d", &N);
  long long x;
  j = 1;
  for (i = 1; i <= N; i++) {
    scanf("%I64d", &x);
    while (!(x >= record[j].ih && x <= record[j].ie)) j++;
    if (record[j].ctype == 1)
      printf("%lld%c", record[j].ch, i == N ? '\n' : ' ');
    else {
      long long idx = (x - record[j].ih + 1) % (record[j].ce);
      if (!idx) idx += record[j].ce;
      printf("%lld%c", a[idx], i == N ? '\n' : ' ');
    }
  }
}
int main() {
  clear();
  init();
  calc();
}
