#include <bits/stdc++.h>
using namespace std;
struct maca {
  int t, ind, ukupno;
  long long int s, r;
} tb[100005];
long long int a[100005];
int presek[319][100005];
vector<int> mg[100005];
bool p[319][100005];
int main() {
  long long int koren, i, j, k, x, n, m, q, h, toje, ppp, ut = 0, koliko;
  long long int res;
  char g;
  cin >> n >> m >> q;
  koren = sqrt(n);
  for (i = 1; i <= n; i++) cin >> a[i];
  for (i = 1; i <= m; i++) {
    cin >> k;
    for (j = 1; j <= k; j++) {
      cin >> x;
      mg[i].push_back(x);
    }
    tb[i].ukupno = k;
    if (k <= koren)
      tb[i].t = 0;
    else
      tb[i].t = 1;
  }
  for (i = 1; i <= m; i++) {
    if (tb[i].t == 1) {
      ut++;
      tb[i].ind = ut;
      presek[ut][0] = i;
      for (j = 0; j < mg[i].size(); j++) {
        x = mg[i][j];
        p[ut][x] = 1;
        tb[i].r += a[x];
      }
    }
  }
  for (i = 1; i <= ut; i++) {
    for (j = 1; j <= m; j++) {
      for (h = 0; h < mg[j].size(); h++) {
        x = mg[j][h];
        if (p[i][x]) presek[i][j]++;
      }
    }
  }
  for (h = 1; h <= q; h++) {
    cin >> g;
    if (g == '+') {
      cin >> k >> koliko;
      if (tb[k].t == 0) {
        for (i = 0; i < mg[k].size(); i++) {
          x = mg[k][i];
          a[x] += koliko;
        }
        for (i = 1; i <= ut; i++) {
          ppp = presek[i][k];
          toje = presek[i][0];
          tb[toje].r += ppp * koliko;
        }
      } else {
        tb[k].s += koliko;
        tb[k].r += koliko * tb[k].ukupno;
      }
    } else {
      cin >> k;
      res = 0;
      if (tb[k].t == 0) {
        for (i = 0; i < mg[k].size(); i++) {
          x = mg[k][i];
          res += a[x];
        }
        for (i = 1; i <= ut; i++) {
          toje = presek[i][0];
          res += presek[i][k] * tb[toje].s;
        }
        cout << res << endl;
      } else {
        res = tb[k].r;
        for (i = 1; i <= ut; i++) {
          toje = presek[i][0];
          if (toje == k) continue;
          res += presek[i][k] * tb[toje].s;
        }
        cout << res << endl;
      }
    }
  }
  return 0;
}
