#include <bits/stdc++.h>
using namespace std;
int A[100005], ctos, que, pregs;
int I[5][100005], cien = 100000;
long long P[100005], hay = 0, tiene = 0, va = 1, cual, hel = 1;
int main() {
  scanf("%d", &ctos);
  for (int i = 1; i <= ctos; i++) {
    scanf("%d%d", &I[1][i], &I[2][i]);
    if (I[1][i] == 2) scanf("%d", &I[3][i]);
  }
  scanf("%d", &pregs);
  for (int i = 1; i <= pregs; i++) {
    scanf("%I64d", &P[i]);
  }
  for (int i = 1; i <= ctos; i++) {
    if (I[1][i] == 1) {
      if (hay < cien) {
        ++hay;
        A[hay] = I[2][i];
      }
      ++tiene;
      if (va <= pregs and tiene == P[va]) {
        printf("%d ", I[2][i]);
        ++va;
      }
    }
    if (I[1][i] == 2) {
      for (int c = 1; c <= I[3][i] and hay < cien; c++) {
        for (int a = 1; a <= I[2][i] and hay < cien; a++) {
          ++hay;
          A[hay] = A[a];
        }
      }
      while (va <= pregs and tiene + I[3][i] * I[2][i] >= P[va]) {
        cual = P[va] - tiene;
        cual %= I[2][i];
        if (cual == 0) cual = I[2][i];
        printf("%d ", A[cual]);
        ++va;
      }
      tiene = tiene + hel * I[3][i] * I[2][i];
    }
  }
  printf("\n");
  return 0;
}
