#include <bits/stdc++.h>
using namespace std;
const long long MAXN = 100005;
long long a[MAXN];
vector<long long> sm[MAXN], lg[MAXN];
long long idx[MAXN];
bool issm[MAXN];
long long lgcnt[MAXN];
long long lgsum[MAXN];
long long dist[MAXN][320];
int32_t main() {
  cout.tie(0), cin.tie(0)->sync_with_stdio(false);
  long long n, m, q;
  cin >> n >> m >> q;
  for (long long i = 1; i <= n; i++) cin >> a[i];
  long long nsm = 0, nlg = 0;
  for (long long i = 1; i <= m; i++) {
    long long len, p;
    cin >> len;
    if (len <= sqrt(n)) {
      vector<long long> s;
      while (len--) {
        cin >> p;
        s.push_back(p);
      }
      sm[++nsm] = s;
      issm[i] = 1;
      idx[i] = nsm;
    } else {
      vector<long long> s;
      while (len--) {
        cin >> p;
        s.push_back(p);
      }
      lg[++nlg] = s;
      idx[i] = nlg;
      for (auto i : s) lgsum[nlg] += a[i];
    }
  }
  for (long long i = 1; i <= nlg; i++) {
    vector<long long> chk(n + 1, 0);
    for (long long j : lg[i]) chk[j] = 1;
    for (long long j = 1; j <= nsm; j++)
      for (long long k : sm[j]) dist[j][i] += chk[k];
    for (long long j = 1; j <= nlg; j++)
      if (j != i)
        for (long long k : lg[j]) dist[j + nsm][i] += chk[k];
  }
  for (long long i = 1; i <= q; i++) {
    char c;
    cin >> c;
    if (c == '+') {
      long long k, x;
      cin >> k >> x;
      long long ii = idx[k];
      if (issm[k]) {
        for (long long i : sm[ii]) a[i] += x;
        for (long long i = 1; i <= nlg; i++)
          lgsum[i] += (long long)x * (long long)dist[ii][i];
      } else
        lgcnt[ii] += x;
    } else {
      long long k;
      cin >> k;
      long long ii = idx[k];
      if (issm[k]) {
        long long res = 0;
        for (long long i : sm[ii]) res += a[i];
        for (long long i = 1; i <= nlg; i++)
          res += (long long)dist[ii][i] * (long long)lgcnt[i];
        cout << res << '\n';
      } else {
        long long res = lgsum[ii] + lgcnt[ii] * lg[ii].size();
        for (long long i = 1; i <= nlg; i++)
          res += (long long)dist[ii + nsm][i] * (long long)lgcnt[i];
        cout << res << '\n';
      }
    }
  }
}
