#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e9;
const long long inf_ll = 1e18;
const long long N = 100005, s = 350;
long long a[N], b[N], c[N], p[N];
int o[s + 5][N];
vector<int> v[N], h, w[N];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n, m, q;
  cin >> n >> m >> q;
  for (long long i = 0; i < n; i++) cin >> a[i];
  for (long long i = 0; i < m; i++) {
    long long k;
    cin >> k;
    v[i].resize(k);
    for (long long j = 0; j < k; j++) {
      cin >> v[i][j], v[i][j]--;
      c[i] += a[v[i][j]];
    }
    if (k > s) h.push_back(i), p[i] = h.size() - 1;
  }
  fill(a, a + N, 0);
  for (long long i = 0; i < h.size(); i++) {
    for (auto& j : v[h[i]]) w[j].push_back(i);
  }
  for (long long i = 0; i < m; i++) {
    for (auto& j : v[i])
      for (auto& k : w[j]) o[k][i]++;
  }
  while (q--) {
    char t;
    cin >> t;
    if (t == '+') {
      long long k, x;
      cin >> k >> x;
      k--;
      if (v[k].size() > s) {
        b[k] += x;
      } else {
        for (auto& i : v[k]) a[i] += x;
        for (long long i = 0; i < h.size(); i++) c[h[i]] += x * o[i][k];
      }
    } else {
      long long k;
      cin >> k;
      k--;
      long long out = c[k];
      ;
      if (v[k].size() <= s)
        for (auto& i : v[k]) out += a[i];
      for (long long i = 0; i < h.size(); i++) out += b[h[i]] * o[i][k];
      cout << out << "\n";
    }
  }
}
