#include <bits/stdc++.h>
using namespace std;
const int N = 100005;
const int NN = 350;
long long int sum[NN], d[NN];
long long int a[N];
vector<int> s[N];
int blk;
bitset<N> f[NN];
int ind[N], inv_ind[N];
int heavy;
int intersect[NN][N];
signed main() {
  int n, m, q;
  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++) {
    int sz, x;
    scanf("%d", &sz);
    blk += sz;
    for (int j = 1; j <= sz; j++) {
      scanf("%d", &x);
      s[i].push_back(x);
    }
  }
  blk = sqrt(blk);
  for (int i = 1; i <= n; i++) {
    if (s[i].size() > blk) {
      ind[i] = ++heavy;
      inv_ind[heavy] = i;
      for (int x : s[i]) {
        f[heavy][x] = 1;
        sum[heavy] += a[x];
      }
      for (int j = 1; j <= m; j++) {
        int ff = 0;
        for (int x : s[j]) {
          ff += f[heavy][x];
        }
        intersect[heavy][j] = ff;
      }
    }
  }
  while (q--) {
    char ss[1];
    int k, x;
    scanf("%s %d", ss, &k);
    if (ss[0] == '+') {
      scanf("%d", &x);
      if (!ind[k]) {
        for (int p : s[k]) {
          a[p] += x;
        }
        for (int i = 1; i <= heavy; i++) {
          sum[i] += x * 1ll * intersect[i][k];
        }
      } else {
        d[ind[k]] += x;
      }
    } else {
      long long int ans = 0;
      if (!ind[k]) {
        for (int p : s[k]) ans += a[p];
        for (int i = 1; i <= heavy; i++) ans += d[i] * intersect[i][k];
      } else {
        k = ind[k];
        ans = sum[k];
        for (int i = 1; i <= heavy; i++) {
          ans += d[i] * intersect[k][inv_ind[i]];
        }
      }
      printf("%lld\n", ans);
    }
  }
  return 0;
}
