#include <bits/stdc++.h>
using namespace std;
const int N = 1e5;
const int Root = 320;
int n, m, q, p[N], l[N], root, k, used[N], cnt[Root][N], pp[N];
long long sum[Root], add[Root], a[N];
vector<vector<int> > s;
bool cmp(int p, int q) { return l[p] > l[q]; }
int main() {
  scanf("%d%d%d", &n, &m, &q);
  for (int i = 0; i < n; i++) scanf("%I64d", a + i);
  s.resize(m);
  for (int i = 0; i < m; i++) {
    scanf("%d", l + i);
    s[i].resize(l[i]);
    for (int j = 0; j < l[i]; j++) {
      scanf("%d", &s[i][j]);
      s[i][j]--;
    }
    p[i] = i;
  }
  sort(p, p + m, cmp);
  root = sqrt(n + .0);
  for (int i = 0; i < m && l[p[i]] > root; i++) k++;
  for (int i = 0; i < k; i++) {
    int ind = p[i];
    for (int j = 0; j < l[ind]; j++) used[s[ind][j]] = i + 1;
    for (int j = 0; j < m; j++) {
      int jnd = p[j];
      for (int t = 0; t < l[jnd]; t++) cnt[i][j] += (used[s[jnd][t]] == i + 1);
    }
  }
  for (int i = 0; i < m; i++) pp[p[i]] = i;
  for (int i = 0; i < k; i++) {
    int ind = p[i];
    for (int j = 0; j < l[ind]; j++) sum[i] += a[s[ind][j]];
  }
  for (int qq = 0; qq < q; qq++) {
    char com;
    int i, x;
    scanf("\n%c%d", &com, &i);
    i--;
    int ind = pp[i];
    if (com == '+') {
      scanf("%d", &x);
      if (ind < k) {
        add[ind] += x;
        for (int j = 0; j < k; j++) {
          if (j == ind) continue;
          sum[j] += 1ll * cnt[ind][j] * x;
          assert(cnt[ind][j] == cnt[j][ind]);
        }
      } else {
        for (int j = 0; j < l[i]; j++) a[s[i][j]] += x;
        for (int j = 0; j < k; j++) sum[j] += 1ll * cnt[j][ind] * x;
      }
    } else {
      long long res = 0;
      if (ind < k) {
        res = sum[ind] + add[ind] * l[i];
      } else {
        for (int j = 0; j < l[i]; j++) res += a[s[i][j]];
        for (int j = 0; j < k; j++) res += add[j] * cnt[j][ind];
      }
      printf("%I64d\n", res);
    }
  }
}
