#include <bits/stdc++.h>
using namespace std;
const int N = 100005;
int n, m, q, x, y, num[205][N], id[N], rk[N];
long long a[N], sum[N], flag[N];
vector<int> v[N];
char opt[10];
int main() {
  scanf("%d%d%d", &n, &m, &q);
  for (int i = 1; i <= n; i++) scanf("%lld", &a[i]);
  for (int i = 1; i <= m; i++) {
    scanf("%d", &y);
    while (y--) {
      scanf("%d", &x);
      v[i].push_back(x);
    }
  }
  int S = 500, cnt = 0;
  for (int i = 1; i <= m; i++)
    if ((int)v[i].size() > S) {
      cnt++;
      id[cnt] = i;
      rk[i] = cnt;
      for (int j : v[i]) flag[j] = 1, sum[i] += a[j];
      for (int j = 1; j <= m; j++)
        for (int k : v[j]) num[cnt][j] += flag[k];
      for (int j : v[i]) flag[j] = 0;
    }
  while (q--) {
    scanf("%s", opt);
    if (opt[0] == '+') {
      scanf("%d%d", &x, &y);
      if ((int)v[x].size() > S)
        flag[rk[x]] += y;
      else
        for (int j : v[x]) a[j] += y;
      for (int j = 1; j <= cnt; j++) sum[id[j]] += (long long)y * num[j][x];
    } else {
      scanf("%d", &x);
      if ((int)v[x].size() > S)
        printf("%lld\n", sum[x]);
      else {
        long long ans = 0;
        for (int j : v[x]) ans += a[j];
        for (int j = 1; j <= cnt; j++) ans += (long long)flag[j] * num[j][x];
        printf("%lld\n", ans);
      }
    }
  }
}
