#include <bits/stdc++.h>
using namespace std;
using graph = vector<vector<int>>;

class lct_node {
	lct_node *l, *r, *p;
	int val, sum;

	int pos() {
		if (p && p->l == this) return -1;
		if (p && p->r == this) return 1;
		return 0;
	}
	void update() {
		sum = (l ? l->sum : 0) + val + (r ? r->sum : 0);
	}
	void rot() {
		lct_node *par = p;
		lct_node *mid;
		if (p->l == this) {
			mid = r;
			r = par;
			par->l = mid;
		}
		else {
			mid = l;
			l = par;
			par->r = mid;
		}
		if (mid) mid->p = par;
		p = par->p;
		par->p = this;
		if (p && p->l == par) p->l = this;
		if (p && p->r == par) p->r = this;
		par->update();
		update();
	}
	void splay() {
		while (pos()) {
			int st = pos() * p->pos();
			if (!st) rot();
			else if (st == 1) p->rot(), rot();
			else rot(), rot();
		}
	}

public:
	lct_node(int v = 0) : l(nullptr), r(nullptr), p(nullptr), val(v), sum(v) {}
	void expose() {
		for (lct_node *x = this, *y = nullptr; x; y = x, x = x->p) x->splay(), x->r = y, x->update();
		splay();
	}
	void link(lct_node *x) {
		x->expose();
		expose();
		p = x;
	}
	void cut() {
		expose();
		l->p = nullptr;
		l = nullptr;
		update();
	}
	int find_sum() {
		expose();
		return sum;
	}
	void update_val(int v) {
		expose();
		val += v;
		update();
	}
};

const int MAX = 1e5;

lct_node lct[MAX];

void build(int v, const graph& G) {
	for (auto to : G[v]) {
		lct[to].link(&lct[v]);
		build(to, G);
	}
}

int main()
{
	ios::sync_with_stdio(false), cin.tie(0);
	int n;
	cin >> n;
	graph G(n);
	for (int i = 0; i < n; i++) {
		int k;
		cin >> k;
		for (int j = 0; j < k; j++) {
			int c;
			cin >> c;
			G[i].push_back(c);
		}
	}
	build(0, G);
	int q;
	cin >> q;
	while (q--) {
		int com;
		cin >> com;
		if (com == 0) {
			int v, w;
			cin >> v >> w;
			lct[v].update_val(w);
		}
		else {
			int u;
			cin >> u;
			printf("%d\n", lct[u].find_sum());
		}
	}
	return 0;
}

