#include <bits/stdc++.h>
using namespace std;
const long long inf = (long long)1e18;
const long long mod = (long long)1e9 + 7;
const double pi = acos(-1.0);
const double eps = (double)1e-9;
const int dx[] = {0, 0, 1, 0, -1};
const int dy[] = {0, 1, 0, -1, 0};
const int N = 100500;
const int M = 320;
const int block = 316;
bool u[N];
int szsm, szlrg;
int sm[N], lrg[M];
int n, m, q, sz[N];
vector<int> v[N];
int rvsm[N], rvlrg[N];
long long a[N], add[M], sum[M];
int lrgsm[M][N], lrglrg[M][M];
int main() {
  cin.tie(NULL);
  cout.tie(NULL);
  ios_base::sync_with_stdio(false);
  cin >> n >> m >> q;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 1; i <= m; i++) {
    cin >> sz[i];
    for (int j = 1; j <= sz[i]; j++) {
      int x;
      cin >> x;
      v[i].push_back(x);
    }
    if (sz[i] <= block) {
      szsm++;
      sm[szsm] = i;
      rvsm[i] = szsm;
    } else {
      szlrg++;
      lrg[szlrg] = i;
      rvlrg[i] = szlrg;
      for (auto j : v[i]) sum[rvlrg[i]] += a[j];
    }
  }
  for (int i = 1; i <= szlrg; i++) {
    memset(u, 0, sizeof(u));
    for (auto j : v[lrg[i]]) u[j] = 1;
    for (int j = 1; j <= szsm; j++)
      for (auto k : v[sm[j]])
        if (u[k]) lrgsm[i][j]++;
    for (int j = 1; j <= szlrg; j++)
      for (auto k : v[lrg[j]])
        if (u[k]) lrglrg[i][j]++;
  }
  for (int i = 1; i <= q; i++) {
    char c;
    cin >> c;
    if (c == '+') {
      int k;
      long long x;
      cin >> k >> x;
      if (sz[k] <= block) {
        for (auto j : v[k]) a[j] += x;
        for (int j = 1; j <= szlrg; j++) sum[j] += lrgsm[j][rvsm[k]] * x;
      } else
        add[rvlrg[k]] += x;
    } else {
      int k;
      cin >> k;
      long long ans = 0;
      if (sz[k] <= block) {
        for (auto j : v[k]) ans += a[j];
        for (int j = 1; j <= szlrg; j++) ans += lrgsm[j][rvsm[k]] * add[j];
        cout << ans << endl;
      } else {
        ans += sum[rvlrg[k]];
        for (int j = 1; j <= szlrg; j++) ans += lrglrg[j][rvlrg[k]] * add[j];
        cout << ans << endl;
      }
    }
  }
  return 0;
}
