#include <bits/stdc++.h>
using namespace std;
long long add[350], sum[350];
int id[110020];
int cnt[110020][350], c[110020];
long long tot[110020];
bool h[110020];
vector<int> g[110020];
vector<int> t[110020];
int n, m, q, k;
int main() {
  while (scanf("%d%d%d", &n, &m, &q) != EOF) {
    for (int i = 0; i < n; ++i) scanf("%I64d", &tot[i]);
    k = 0;
    for (int i = 0; i < m; ++i) {
      scanf("%d", &c[i]);
      if (c[i] >= 350) {
        h[i] = 1;
        id[i] = k++;
      } else
        h[i] = 0;
      for (int j = 0; j < c[i]; ++j) {
        int u;
        scanf("%d", &u);
        --u;
        g[i].push_back(u);
        if (h[i]) {
          t[u].push_back(k - 1);
          sum[k - 1] += tot[u];
        }
      }
    }
    for (int i = 0; i < m; ++i) {
      for (int j = 0; j < g[i].size(); ++j) {
        int u = g[i][j];
        for (int kk = 0; kk < t[u].size(); ++kk) {
          int v = t[u][kk];
          cnt[i][v]++;
        }
      }
    }
    while (q--) {
      char op[4];
      int p;
      long long x;
      scanf("%s%d", op, &p);
      --p;
      if (op[0] == '?') {
        long long ans = 0;
        if (h[p]) {
          ans += sum[id[p]];
          for (int i = 0; i < k; ++i) ans += cnt[p][i] * add[i];
        } else {
          for (int i = 0; i < g[p].size(); ++i) {
            ans += tot[g[p][i]];
          }
          for (int i = 0; i < k; ++i) ans += cnt[p][i] * add[i];
        }
        printf("%I64d\n", ans);
      } else {
        scanf("%I64d", &x);
        if (h[p]) {
          add[id[p]] += x;
        } else {
          for (int i = 0; i < g[p].size(); ++i) tot[g[p][i]] += x;
          for (int i = 0; i < k; ++i) sum[i] += cnt[p][i] * x;
        }
      }
    }
  }
  return 0;
}
