#include <bits/stdc++.h>
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
long long arr[100005], sum[100005], lazy[100005], idx[100005];
int sz;
bool heavy[305][100005];
int inter[100005][305];
vector<int> adj[100005];
int cnt;
void solve() {
  int i, j, k, l, r, m, n, a, b, c, d, x, y, z, t;
  cin >> n >> k >> m;
  sz = sqrt(n) + 0.0001;
  sz = min(sz, 300);
  for (i = 1; i <= n; i++) {
    cin >> arr[i];
  }
  for (i = 0; i < k; i++) {
    cin >> x;
    adj[i].resize(x);
    for (auto &cv : adj[i]) {
      cin >> cv;
      sum[i] += arr[cv];
      if (x > sz) {
        heavy[cnt][cv] = 1;
      }
    }
    if (x > sz) idx[cnt++] = i;
  }
  for (i = 0; i < k; i++) {
    for (auto &cv : adj[i]) {
      for (int j = 0; j < cnt; j++) {
        if (heavy[j][cv]) inter[i][j]++;
      }
    }
  }
  while (m--) {
    char ch;
    cin >> ch;
    if (ch == '?') {
      cin >> x;
      long long ans = 0;
      if (adj[x - 1].size() > sz) {
        ans = sum[x - 1];
      } else {
        for (auto &cv : adj[x - 1]) {
          ans += arr[cv];
        }
      }
      for (i = 0; i < cnt; i++) {
        ans += 1LL * (inter[x - 1][i] * lazy[idx[i]]);
      }
      cout << ans << '\n';
    } else {
      cin >> x >> y;
      x--;
      if (adj[x].size() > sz) {
        lazy[x] += y;
      } else {
        sum[x] += y * adj[x].size();
        for (auto &cv : adj[x]) arr[cv] += y;
        for (i = 0; i < cnt; i++) {
          sum[idx[i]] += inter[x][i] * y;
        }
      }
    }
  }
}
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int t = 1;
  while (t--) solve();
  return 0;
}
