#include <bits/stdc++.h>
using namespace std;
const int B = 335;
const int N = 1e5 + 10;
int n, m, k;
vector<int> v[N];
vector<int> g[N];
int cnt[N][B], is[N], tot;
long long a[N], sum[B], add[B];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  memset(is, -1, sizeof is);
  cin >> n >> m >> k;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  for (int i = 1; i <= m; i++) {
    int c;
    cin >> c;
    if (c > B) is[i] = tot++;
    while (c--) {
      int x;
      cin >> x;
      v[i].push_back(x);
      if (is[i] >= 0) {
        g[x].push_back(is[i]);
        sum[is[i]] += a[x];
      }
    }
  }
  for (int i = 1; i <= m; i++) {
    for (int j : v[i]) {
      for (int q : g[j]) {
        cnt[i][q]++;
      }
    }
  }
  while (k--) {
    string s;
    int x, y;
    cin >> s;
    if (s == "+") {
      cin >> x >> y;
      if (is[x] == -1) {
        for (int i : v[x]) a[i] += y;
        for (int i = 0; i < tot; i++) sum[i] += 1LL * cnt[x][i] * y;
      } else {
        add[is[x]] += y;
      }
    } else {
      cin >> x;
      long long ans = 0;
      if (is[x] == -1) {
        for (int i : v[x]) ans += a[i];
        for (int i = 0; i < tot; i++) ans += 1LL * cnt[x][i] * add[i];
      } else {
        ans = sum[is[x]];
        for (int i = 0; i < tot; i++) ans += 1LL * cnt[x][i] * add[i];
      }
      cout << ans << endl;
    }
  }
  return 0;
}
