#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
ll getrnd(ll l, ll r) { return uniform_int_distribution<ll>(l, r)(rng); }
template <typename T1, typename T2>
inline bool relax(T1& a, const T2& b) {
  return a > b ? a = b, true : false;
}
template <typename T1, typename T2>
inline bool strain(T1& a, const T2& b) {
  return a < b ? a = b, true : false;
}
const int N = 1e5 + 5, SQ = 400;
int cnt[SQ][N], big[N], ind[N];
vector<int> s[N], pos[N];
ll sum[SQ], add[SQ], a[N];
void solve() {
  int n, m, q;
  cin >> n >> m >> q;
  for (int i = 0; i < n; ++i) cin >> a[i];
  int id = 0;
  for (int i = 0; i < m; ++i) {
    int k;
    cin >> k;
    big[i] = k >= SQ;
    if (big[i]) ind[i] = id++;
    for (int j = 0; j < k; ++j) {
      int x;
      cin >> x;
      --x;
      s[i].emplace_back(x);
      if (big[i]) {
        sum[ind[i]] += a[x];
        pos[x].emplace_back(ind[i]);
      }
    }
  }
  for (int i = 0; i < m; ++i) {
    for (int j : s[i])
      for (int k : pos[j]) cnt[k][i]++;
  }
  while (q--) {
    char t;
    int k;
    cin >> t >> k;
    --k;
    if (t == '?') {
      if (big[k])
        cout << sum[ind[k]] << '\n';
      else {
        ll res = 0;
        for (int i : s[k]) res += a[i];
        for (int i = 0; i < id; ++i) res += add[i] * cnt[i][k];
        cout << res << '\n';
      }
    } else {
      ll x;
      cin >> x;
      if (!big[k]) {
        for (int i : s[k]) a[i] += x;
      } else
        add[ind[k]] += x;
      for (int i = 0; i < id; ++i) sum[i] += 1LL * x * cnt[i][k];
    }
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(nullptr);
  cout.tie(nullptr);
  int t = 1;
  while (t--) solve();
  return 0;
}
