#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n, m, q;
  cin >> n >> m >> q;
  vector<vector<int>> a(m);
  vector<long long> val(n);
  for (int i = 0; i < n; i++) cin >> val[i];
  for (int i = 0; i < m; i++) {
    int foo;
    cin >> foo;
    a[i].resize(foo);
    for (auto& x : a[i]) {
      cin >> x;
      --x;
    }
  }
  int lim = 300;
  vector<int> big;
  vector<long long> up(m);
  for (int i = 0; i < m; i++) {
    if ((int)a[i].size() > lim) {
      big.push_back(i);
      for (auto& x : a[i]) up[i] += val[x];
    }
  }
  vector<long long> offset(m);
  vector<vector<int>> cnt(m, vector<int>((int)big.size()));
  vector<bool> kt(n);
  for (int i = 0; i < (int)big.size(); i++) {
    for (auto& id : a[big[i]]) kt[id] = true;
    for (int j = 0; j < m; j++) {
      for (auto& x : a[j])
        if (kt[x]) cnt[j][i]++;
    }
    for (auto& id : a[big[i]]) kt[id] = false;
  }
  while (q--) {
    char ch;
    cin >> ch;
    if (ch == '?') {
      int pos;
      cin >> pos;
      --pos;
      long long ans = 0;
      if ((int)a[pos].size() <= lim) {
        for (auto& x : a[pos]) ans += val[x];
      } else
        ans = up[pos];
      for (int i = 0; i < (int)big.size(); i++)
        ans += offset[big[i]] * cnt[pos][i];
      cout << ans << "\n";
    } else {
      int pos, x;
      cin >> pos >> x;
      --pos;
      if ((int)a[pos].size() <= lim) {
        for (auto& id : a[pos]) val[id] += x;
        for (int i = 0; i < (int)big.size(); i++)
          up[big[i]] += 1ll * x * cnt[pos][i];
      } else
        offset[pos] += x;
    }
  }
}
