#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5, SQRT = 320 + 5;
long long a[N], sum[SQRT], lazy[SQRT];
int n, m, q, sq, sz[N], id[N];
vector<pair<int, int>> adj[N];
vector<int> S[N], par[N];
void add(int cur, int x) {
  for (auto u : adj[cur]) sum[u.first] += 1LL * x * u.second;
  if (sz[cur] <= sq)
    for (auto p : S[cur]) a[p] += x;
  else
    lazy[id[cur]] += x;
}
long long get(int cur) {
  if (sz[cur] <= sq) {
    long long s = 0;
    for (auto p : S[cur]) s += a[p];
    for (auto u : adj[cur]) s += lazy[u.first] * u.second;
    return s;
  }
  return sum[id[cur]];
}
void readInput() {
  cin >> n >> m >> q;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < m; i++) {
    cin >> sz[i], S[i].resize(sz[i]);
    for (int j = 0; j < sz[i]; j++) cin >> S[i][j], par[--S[i][j]].push_back(i);
  }
}
void prep() {
  sq = sqrt(n);
  for (int i = 0, cnt = 0; i < m; i++)
    if (sz[i] > sq) {
      for (auto p : S[i]) {
        sum[cnt] += a[p];
        for (auto u : par[p]) adj[u].push_back({cnt, 1});
      }
      id[i] = cnt++;
    }
  for (int i = 0; i < m; i++) {
    sort(adj[i].begin(), adj[i].end());
    for (int st = 0, j = 0; st < adj[i].size(); j++)
      if (j == adj[i].size() || adj[i][st].first != adj[i][j].first)
        while (++st < j)
          adj[i][st].second += adj[i][st - 1].second, adj[i][st - 1] = {n, n};
    sort(adj[i].begin(), adj[i].end()),
        adj[i].resize(unique(adj[i].begin(), adj[i].end()) - adj[i].begin());
    if (!adj[i].empty() && adj[i].back().first == n) adj[i].pop_back();
  }
}
void writeOutput() {
  for (int i = 0; i < q; i++) {
    char c;
    int k, x;
    cin >> c >> k;
    k--;
    if (c == '?')
      cout << get(k) << endl;
    else
      cin >> x, add(k, x);
  }
}
int main() {
  ios_base ::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  readInput(), prep(), writeOutput();
  return 0;
}
