#include <bits/stdc++.h>
using namespace std;
const int Maxn = 100000 + 10;
int isSet[Maxn] = {0};
int nums[Maxn] = {0};
vector<long long> intervals;
vector<vector<long long> > steps;
int main() {
  long long count = 0;
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    int type;
    cin >> type;
    if (type == 1) {
      long long k;
      cin >> k;
      vector<long long> add(2);
      add[0] = type;
      add[1] = k;
      steps.push_back(add);
      intervals.push_back(count);
      count++;
    }
    if (type == 2) {
      long long l, c;
      cin >> l >> c;
      vector<long long> add(3);
      add[0] = type;
      add[1] = l;
      add[2] = c;
      steps.push_back(add);
      intervals.push_back(count + l * c - 1);
      count += l * c;
    }
  }
  int m;
  int flag = 0;
  cin >> m;
  for (int i = 0; i < m; i++) {
    long long query;
    cin >> query;
    query--;
    int andis = lower_bound(intervals.begin(), intervals.end(), query) -
                intervals.begin();
    if (steps[andis][0] != 1) {
      while (steps[andis][0] != 1) {
        andis = lower_bound(intervals.begin(), intervals.end(), query) -
                intervals.begin();
        query = (query - intervals[andis - 1] - 1) % steps[andis][1];
      }
    }
    cout << (flag++ ? " " : "") << steps[andis][1];
  }
  cout << endl;
  return 0;
}
