#include <bits/stdc++.h>
using namespace std;
vector<long long> v[100001];
long long n, m, _, k[100001], o[100001][201], a[100001], i, j, x, ans, t,
    tag[301], g[301], c[100001], s[301], p, y;
bitset<100001> b[201];
char st[10];
int main() {
  scanf("%lld%lld%lld", &n, &m, &_);
  for (i = 1; i <= n; i++) scanf("%lld", &a[i]);
  for (i = 1; i <= m; i++) {
    scanf("%lld", &k[i]);
    for (j = 1; j <= k[i]; j++) scanf("%lld", &x), v[i].push_back(x);
    sort(v[i].begin(), v[i].end());
    if (k[i] > 500) {
      g[++t] = i;
      c[i] = t;
      for (j = 0; j < k[i]; j++) b[t][v[i][j]] = 1, s[t] += a[v[i][j]];
    }
  }
  for (i = 1; i <= m; i++)
    for (j = 1; j <= t; j++)
      for (p = 0; p < k[i]; p++)
        if (b[j][v[i][p]]) o[i][j]++;
  while (_--) {
    scanf("%s%lld", st, &x);
    if (st[0] == '?') {
      ans = 0;
      for (i = 1; i <= t; i++) ans += tag[i] * o[x][i];
      if (c[x])
        ans += s[c[x]];
      else
        for (i = 0; i < k[x]; i++) ans += a[v[x][i]];
      printf("%lld\n", ans);
    } else {
      scanf("%lld", &y);
      if (!c[x]) {
        for (i = 1; i <= t; i++) s[i] += o[x][i] * y;
        for (i = 0; i < k[x]; i++) a[v[x][i]] += y;
      } else
        tag[c[x]] += y;
    }
  }
}
