#include <bits/stdc++.h>
using namespace std;
const int INF = (-1u) / 2;
const long long int INF2 = (-1ull) / 2;
long long int a, b, i, j, k, n, m, timer = 0, l, r, x, y, sz[100010],
                                   an[100010], ind[100010];
long long int c[101000], cnt = 0, fl = 0, a2, a3 = -1000000, ans = 0, q,
                         in[100010][320], kol[100010];
vector<long long int> big, small, g[100010], al[100010];
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n >> m >> q;
  for (i = 1; i <= n; i++) {
    cin >> c[i];
  }
  for (i = 1; i <= m; i++) {
    cin >> sz[i];
    if (sz[i] >= 320) {
      big.push_back(i);
      ind[i] = big.size();
    } else
      small.push_back(i);
    for (j = 0; j < sz[i]; j++) {
      cin >> k;
      an[i] += c[k];
      al[i].push_back(k);
      if (sz[i] >= 320) g[k].push_back(big.size());
    }
  }
  for (i = 1; i <= n; i++) {
    for (j = 0; j < sz[i]; j++) {
      for (k = 0; k < g[al[i][j]].size(); k++) {
        in[i][g[al[i][j]][k]]++;
      }
    }
  }
  char rt;
  for (i = 0; i < q; i++) {
    cin >> rt;
    if (rt == '+') {
      cin >> x >> y;
      if (ind[x] == 0) {
        for (j = 0; j < sz[x]; j++) {
          c[al[x][j]] += y;
        }
        for (j = 0; j < big.size(); j++) {
          an[big[j]] += (in[x][j + 1] * y);
        }
      } else {
        kol[x] += y;
      }
    } else {
      cin >> x;
      if (ind[x] == 0) {
        ans = 0;
        for (j = 0; j < sz[x]; j++) {
          ans += c[al[x][j]];
        }
        for (j = 0; j < big.size(); j++) {
          ans += (in[x][j + 1] * kol[big[j]]);
        }
      } else {
        ans = an[x];
        for (j = 0; j < big.size(); j++) {
          ans += (in[x][ind[big[j]]] * kol[big[j]]);
        }
      }
      cout << ans << endl;
    }
  }
  return 0;
}
