#include <bits/stdc++.h>
using namespace std;
const int N = 100010;
const int K = 300;
int n, m, q, l[N][350];
long long a[N], sum[N], t[N], ans;
struct se {
  vector<int> x;
  int sz, hvy;
} b[N];
vector<int> S[N], h;
void iWork() {
  cin >> n >> m >> q;
  int i, j, k;
  for (i = 1; i <= n; i++) scanf("%I64d", &a[i]);
  for (i = 1; i <= m; i++) {
    scanf("%d", &b[i].sz);
    for (j = 1; j <= b[i].sz; j++) {
      scanf("%d", &k);
      sum[i] += a[k];
      b[i].x.push_back(k);
      S[k].push_back(i);
    }
    if (b[i].sz >= K)
      b[i].hvy = 1, h.push_back(i);
    else
      b[i].hvy = 0;
  }
  int x = 0, y;
  for (auto i : h) {
    for (auto j : b[i].x)
      for (auto k : S[j]) l[k][x]++;
    x++;
  }
  while (q--) {
    char c[5];
    scanf("%s %d", c, &x);
    if (c[0] == '?') {
      ans = 0;
      for (i = 0; i < h.size(); i++) ans += t[h[i]] * l[x][i];
      if (b[x].hvy)
        ans += sum[x];
      else {
        for (auto i : b[x].x) ans += a[i];
      }
      printf("%I64d\n", ans);
    } else {
      scanf("%d", &y);
      if (b[x].hvy)
        t[x] += y;
      else {
        for (auto i : b[x].x) a[i] += y;
        for (i = 0; i < h.size(); i++) sum[h[i]] += y * l[x][i];
      }
    }
  }
}
int main() {
  iWork();
  return 0;
}
