#include <cstring>
#include <iostream>
#include <cassert>
using std::cin;
using std::cout;
using std::endl;
using ll = long long;

template <typename T> T max(T a, T b) { return (a > b) ? a : b; }

template <typename T> T min(T a, T b) { return (a < b) ? a : b; }

template <typename T> class Vector {
private:
  unsigned int end;
  unsigned int alloc;

public:
  T *A;
  Vector() : end(0), alloc(1), A((T *)malloc(sizeof(T))) {}
  // Vector(){
  //   end = 0;
  //   alloc = 1;
  //   A = (T *)malloc(sizeof(T));
  // }
  Vector(const unsigned int initial_size) {
    end = initial_size;
    alloc = max((unsigned int)1, initial_size);
    A = (T *)malloc(sizeof(T) * initial_size);
  }
  Vector(const Vector &other) {
    end = other.end;
    alloc = other.alloc;
    A = (T *)malloc(sizeof(T) * alloc);
    memcpy(A, other.A, sizeof(T) * alloc);
  }
  Vector &operator=(const Vector &other) {
    if (this != &other) {
      end = other.end;
      alloc = other.alloc;
      A = (T *)malloc(sizeof(T) * alloc);
      memcpy(A, other.A, sizeof(T) * alloc);
    }
    return *this;
  }
  unsigned int size() const { return end; }
  void push_back(T v) {
    if (end < alloc) {
    } else {
      if (alloc == 0 || A == NULL) {
        A = (T *)malloc(sizeof(T));
        alloc++;
      } else {
        unsigned int nalloc = alloc * 2;
        T *nA = (T *)malloc(sizeof(T) * nalloc);
        memcpy(nA, A, sizeof(T) * end);
        free(A);
        A = nA;
        alloc = nalloc;
      }
    }
    A[end] = v;
    end++;
  }
  void pop_back() {
    if (end == 0)
      return;
    end--;
  }
  T &operator[](unsigned int idx) { return A[idx]; }
  ~Vector() { free(A); }
};

template <typename T> class SegTree {
  static const int MAXN = 1000010;
  T *A;
  int n;

public:
  SegTree(int size) {
    n = 1;
    while (n < size) {
      n *= 2;
    }
    n *= 2;
    A = new T[MAXN * 4];
    for (int i = 0; i < MAXN * 4; i++)
      A[i] = 0;
  }

  T query(int a, int b) { return _query(a, b, 0, 0, n); }

  T _query(int a, int b, int k, int l, int r) {
    if (a >= r || b <= l) {
      return 0;
    }
    if (l >= a && r <= b) {
      return A[k];
    }
    T v1 = _query(a, b, 2 * k + 1, l, (l + r) / 2);
    T v2 = _query(a, b, 2 * k + 2, (l + r) / 2, r);
    return (v1 + v2);
  }

  void update(int _idx, int value) {
    int offset = n - 1;
    int idx = _idx + offset;
    A[idx] = value;
    while (idx > 0) {
      idx = (idx - 1) / 2;
      A[idx] = (A[idx * 2 + 1] + A[idx * 2 + 2]);
    }
  }
};

void euler_tour(int v, int prev, Vector<Vector<int>> &G, Vector<int> &e_rev, Vector<int> &e_in, Vector<int> &e_out) {
  e_in[v] = e_rev.size()-1;
  e_rev.push_back(v);
  for (int i = 0; i < (int)G[v].size(); i++) {
    if (G[v][i] != prev) {
      euler_tour(G[v][i], v, G, e_rev, e_in, e_out);
    }
  }
  e_out[v] = e_rev.size()-1;
  e_rev.push_back(-v);
}

Vector<int> calc_e(Vector<int> &e_rev, int n) {
  Vector<int> res(n);
  for (int i = 0; i < n; i++)
    res[i] = -1;
  for (int i = 0; i < (int)e_rev.size(); i++) {
    int v = abs(e_rev[i]);
    if (res[v] == -1) {
      res[v] = i;
    }
  }
  return res;
}

int main(void) {
  int n;
  cin >> n;
  Vector<Vector<int>> G(n);
  for (int i = 0; i < n; i++) {
    int k;
    cin >> k;
    Vector<int> c(k);
    for (int j = 0; j < k; j++) {
      cin >> c[j];
    }
    G[i] = c;
  }

  Vector<int> e_rev;
  Vector<int> e_in(n), e_out(n);
  euler_tour(0, -1, G, e_rev, e_in, e_out);
  Vector<int> e = calc_e(e_rev, n);
  Vector<int> weight(n);
  for (int i = 0; i < n; i++) {
    weight[i] = 0;
  }

  SegTree<int> rsq(n);
  for (int i = 0; i < (int)e_rev.size(); i++) {
    rsq.update(i, 0);
  }

  int q;
  cin >> q;
  for (int loop = 0; loop < q; loop++) {
    int op;
    cin >> op;
    if (op == 0) {
      int v, w;
      cin >> v >> w;
      // weight[v] += w;
      int idx_in = e_in[v];
      {
      int prev = rsq.query(idx_in, idx_in+1);
      rsq.update(idx_in, prev + w);
      }

      int idx_out = e_out[v];
      {
        int prev = rsq.query(idx_out, idx_out+1);
        rsq.update(idx_out, prev - w);
      }
    } else if (op == 1) {
      int u;
      cin >> u;
      cout << rsq.query(0, e_in[u]+1) << '\n';
    } else {
      assert(false);
    }
  }
}



Measured memory_bytes: 36364