#include <bits/stdc++.h>
using namespace std;
const int N = 1e5;
const int S = 330;
long long a[N];
vector<int> s[N], hvy;
long long su[S], lz[S];
bitset<N> has[S];
int idx[N], cnt[S][N];
int main() {
  int n, m, q, k, x;
  char c;
  scanf("%d %d %d", &n, &m, &q);
  for (int i = 0; i < n; ++i) scanf("%lld", a + i);
  hvy.reserve(S);
  memset(idx, -1, sizeof idx);
  for (int i = 0, j; i < m; ++i) {
    scanf("%d", &k);
    s[i].assign(k, 0);
    if (k > S) {
      idx[i] = hvy.size();
      hvy.emplace_back(i);
    }
    while (k--) {
      scanf("%d", &j);
      --j;
      s[i][k] = j;
      if (idx[i] != -1) {
        su[idx[i]] += a[j];
        has[idx[i]].set(j);
      }
    }
  }
  for (int i : hvy) {
    for (int k = 0; k < m; ++k)
      for (int j : s[k]) cnt[idx[i]][k] += has[idx[i]][j];
  }
  while (q--) {
    scanf(" %c %d", &c, &k);
    --k;
    if (c == '?') {
      long long y = 0;
      if (idx[k] != -1)
        y = su[idx[k]];
      else
        for (int i : s[k]) y += a[i];
      for (int i : hvy) y += 1ll * cnt[idx[i]][k] * lz[idx[i]];
      printf("%lld\n", y);
    } else {
      scanf("%d", &x);
      if (idx[k] != -1)
        lz[idx[k]] += x;
      else {
        for (int i : s[k]) a[i] += x;
        for (int i : hvy) su[idx[i]] += 1ll * cnt[idx[i]][k] * x;
      }
    }
  }
  return 0;
}
