#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 100;
int n, m, q, k, x, sum, id[maxn], unions[maxn][400];
long long a[maxn], up[maxn], pre[maxn];
vector<int> g[maxn];
vector<int> v[maxn];
vector<int> big;
int main() {
  cin >> n >> m >> q;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
  }
  memset(id, -1, sizeof(id));
  for (int i = 1; i <= m; ++i) {
    cin >> k;
    sum += k;
    for (int j = 1; j <= k; ++j) {
      cin >> x;
      g[i].push_back(x);
      pre[i] += a[x];
    }
  }
  int len = sqrt(sum);
  for (int i = 1; i <= m; ++i) {
    if (len <= g[i].size()) {
      id[i] = big.size();
      big.push_back(i);
      for (auto j : g[i]) {
        v[j].push_back(id[i]);
      }
    }
  }
  for (int i = 1; i <= m; ++i) {
    for (auto j : g[i]) {
      for (auto l : v[j]) {
        unions[i][l]++;
      }
    }
  }
  for (int i = 1; i <= q; ++i) {
    string s;
    cin >> s >> k;
    if (s[0] == '+') {
      cin >> x;
      if (g[k].size() >= len) {
        up[k] += x;
      } else {
        for (auto j : g[k]) {
          a[j] += x;
        }
        for (int j = 0; j < big.size(); ++j) {
          pre[big[j]] += unions[k][j] * x;
        }
      }
    } else {
      long long ans = 0;
      if (g[k].size() >= len) {
        ans = pre[k];
      } else {
        for (auto j : g[k]) {
          ans += a[j];
        }
      }
      for (int j = 0; j < big.size(); ++j) {
        ans += unions[k][j] * up[big[j]];
      }
      cout << ans << endl;
    }
  }
  return 0;
}
