#include <bits/stdc++.h>
using namespace std;
const int maxn = (int)1e5 + 10;
const int maxm = 300;
int n, m, q, large, c[maxn], cs[maxn];
long long res, sum[maxn], d[maxn], a[maxn];
vector<int> ds[maxn], s[maxn], t[maxn];
void input() {
  cin >> n >> m >> q;
  for (int i = (0), _b = (n); i < _b; ++i) scanf("%I64d", a + i);
  for (int i = (0), _b = (m); i < _b; ++i) {
    int k;
    scanf("%d", &k);
    if (k > maxm) {
      c[large] = i;
      cs[i] = large++;
    }
    for (int j = (0), _b = (k); j < _b; ++j) {
      int u;
      scanf("%d", &u);
      u--;
      ds[i].push_back(u);
      sum[i] += a[u];
      if (k > maxm) t[u].push_back(i);
    }
  }
  for (int i = (0), _b = (m); i < _b; ++i) {
    s[i].resize(large, 0);
    for (int j = (0), _b = ((int)ds[i].size()); j < _b; ++j) {
      int u = ds[i][j];
      for (int k = (0), _b = ((int)t[u].size()); k < _b; ++k) {
        s[i][cs[t[u][k]]]++;
      }
    }
  }
}
void process() {
  for (int j = (0), _b = (q); j < _b; ++j) {
    char p;
    int k, x;
    scanf(" %c %d", &p, &k);
    k--;
    if (p == '?') {
      res = 0;
      for (int i = (0), _b = (large); i < _b; ++i) res += d[i] * s[k][i];
      if ((int)ds[k].size() <= maxm) {
        for (int i = (0), _b = ((int)ds[k].size()); i < _b; ++i)
          res += a[ds[k][i]];
      } else
        res += sum[k];
      printf("%I64d\n", res);
    } else {
      scanf("%d", &x);
      if ((int)ds[k].size() <= maxm) {
        for (int i = (0), _b = ((int)ds[k].size()); i < _b; ++i)
          a[ds[k][i]] += x;
        for (int i = (0), _b = (large); i < _b; ++i) sum[c[i]] += s[k][i] * x;
      } else
        d[cs[k]] += x;
    }
  }
}
int main() {
  input();
  process();
  return 0;
}
