#include <bits/stdc++.h>
#pragma GCC optimize("O2")
#pragma GCC optimize("unroll-loops")
using namespace std;
const long double eps = 1e-7;
const int inf = 1000000010;
const long long INF = 10000000000000010LL;
const int mod = 1000000007;
const int MAXN = 100010, SQ = 500;
int n, m, q, k, u, v, x, y, t, a, b;
long long A[MAXN];
int B[SQ][MAXN];
int id[MAXN], ts;
long long ans[MAXN], lazy[MAXN];
bool big[MAXN], mark[MAXN];
vector<int> S[MAXN], vec;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m >> q;
  for (int i = 1; i <= n; i++) cin >> A[i];
  for (int i = 1; i <= m; i++) {
    cin >> k;
    S[i].resize(k);
    for (int j = 0; j < k; j++) cin >> S[i][j];
    big[i] = (k > SQ);
    if (!big[i]) continue;
    vec.push_back(i);
    id[i] = ++ts;
    for (int j : S[i]) ans[i] += A[j];
  }
  for (int i : vec) {
    for (int j : S[i]) mark[j] = 1;
    for (int j = 1; j <= m; j++)
      for (int k : S[j]) B[id[i]][j] += mark[k];
    for (int j : S[i]) mark[j] = 0;
  }
  while (q--) {
    char ch;
    cin >> ch >> k;
    if (ch == '?') {
      if (big[k])
        cout << ans[k] << '\n';
      else {
        long long res = 0;
        for (int j : S[k]) res += A[j];
        for (int j : vec) res += lazy[j] * B[id[j]][k];
        cout << res << '\n';
      }
      continue;
    }
    cin >> x;
    if (big[k])
      lazy[k] += x;
    else {
      for (int j : S[k]) A[j] += x;
    }
    for (int j : vec) ans[j] += 1ll * B[id[j]][k] * x;
  }
  return 0;
}
