#include <bits/stdc++.h>
using namespace std;
int n, m, q, tot, rec[100010], cnt[100010][360], num[360], Limit, W,
    tmp[100010];
long long delta[360], sum[360], a[100010];
struct Set {
  int k, l, r;
} s[100010];
long long AskBig(int now) {
  int pos = tmp[now];
  long long ans = sum[pos];
  for (int i = 1; i <= W; i++) ans += (long long)cnt[now][i] * delta[i];
  return ans;
}
long long AskSmall(int now) {
  long long ans = 0;
  for (int i = s[now].l; i <= s[now].r; i++) ans += a[rec[i]];
  for (int i = 1; i <= W; i++) ans += (long long)cnt[now][i] * delta[i];
  return ans;
}
void ChangeSmall(int now, int v) {
  for (int i = s[now].l; i <= s[now].r; i++) a[rec[i]] += v;
  for (int i = 1; i <= W; i++) sum[i] += (long long)cnt[now][i] * v;
}
int main() {
  scanf("%d%d%d", &n, &m, &q);
  Limit = ceil(sqrt(n));
  for (int i = 1; i <= n; i++) scanf("%I64d", &a[i]);
  for (int i = 1; i <= m; i++) {
    int k;
    scanf("%d", &k);
    s[i].k = k;
    s[i].l = tot + 1;
    for (int j = 1; j <= k; j++) {
      int x;
      scanf("%d", &x);
      rec[++tot] = x;
    }
    s[i].r = tot;
    if (k > Limit) num[++W] = i;
  }
  for (int i = 1; i <= W; i++) {
    int u = num[i];
    for (int j = s[u].l; j <= s[u].r; j++) {
      ++tmp[rec[j]];
      sum[i] += a[rec[j]];
    }
    for (int j = 1; j <= m; j++)
      for (int k = s[j].l; k <= s[j].r; k++) cnt[j][i] += tmp[rec[k]];
    for (int j = s[u].l; j <= s[u].r; j++) --tmp[rec[j]];
  }
  for (int i = 1; i <= W; i++) tmp[num[i]] = i;
  for (int i = 1; i <= q; i++) {
    char c = getchar();
    int x, v;
    while (c != '?' && c != '+') c = getchar();
    if (c == '?') {
      scanf("%d", &x);
      if (s[x].k > Limit)
        printf("%I64d\n", AskBig(x));
      else
        printf("%I64d\n", AskSmall(x));
    } else {
      scanf("%d%d", &x, &v);
      if (s[x].k > Limit)
        delta[tmp[x]] += v;
      else
        ChangeSmall(x, v);
    }
  }
  return 0;
}
