#include <bits/stdc++.h>
using namespace std;
const int B = 350, MX = 110005;
long long add[B] = {}, sum[B] = {};
int id[MX] = {};
int cnt[MX][B] = {};
int c[MX] = {};
long long a[MX] = {};
bool h[MX] = {};
vector<int> g[MX] = {};
vector<int> t[MX] = {};
int n, m, q, k = 0;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> n >> m >> q;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 1; i <= m; i++) {
    int _c;
    cin >> _c;
    c[i] = _c;
    bool _h = _c >= B;
    h[i] = _h;
    if (_c >= B) {
      id[i] = k++;
    }
    for (int j = 0; j < _c; j++) {
      int u;
      cin >> u;
      u--;
      g[i].push_back(u);
      if (_h) {
        t[u].push_back(k - 1);
        sum[k - 1] += a[u];
      }
    }
  }
  for (int i = 1; i <= m; i++) {
    for (int u : g[i]) {
      for (int v : t[u]) {
        cnt[i][v]++;
      }
    }
  }
  while (q--) {
    char o;
    int p;
    cin >> o >> p;
    if (o == '?') {
      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 u : g[p]) ans += a[u];
        for (int i = 0; i < k; i++) ans += cnt[p][i] * add[i];
      }
      printf("%lld\n", ans);
    } else {
      int x;
      cin >> x;
      if (h[p])
        add[id[p]] += x;
      else {
        for (int u : g[p]) a[u] += x;
        for (int i = 0; i < k; i++) sum[i] += cnt[p][i] * x;
      }
    }
  }
}
