#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100 * 1000 + 17, SQ = 350;
int n, m, q, com[MAXN][SQ];
long long a[MAXN], sum[MAXN], w[MAXN], sum_aft[MAXN];
set<int> st[MAXN];
bool is_heavy[MAXN];
vector<int> s[MAXN], heavy;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  cin >> n >> m >> q;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 0; i < m; i++) {
    int sz;
    cin >> sz;
    s[i].resize(sz);
    for (int j = 0; j < sz; j++) cin >> s[i][j], sum[i] += a[s[i][j]];
    for (auto j : s[i]) st[i].insert(j);
    if (sz > SQ) {
      w[i] = heavy.size();
      heavy.push_back(i), is_heavy[i] = true;
    }
  }
  for (int i = 0; i < m; i++)
    for (int j : heavy) {
      if (s[i].size() < s[j].size()) {
        for (auto k : s[i])
          if (st[j].count(k)) com[i][w[j]]++;
      } else {
        for (auto k : s[j])
          if (st[i].count(k)) com[i][w[j]]++;
      }
    }
  while (q--) {
    char type;
    cin >> type;
    if (type == '+') {
      long long x, y;
      cin >> x >> y;
      x--;
      for (auto j : heavy) sum[j] += 1LL * com[x][w[j]] * y;
      if (!is_heavy[x]) {
        for (auto j : s[x]) a[j] += y;
      } else
        sum_aft[x] += y;
    } else {
      long long x;
      cin >> x;
      x--;
      if (is_heavy[x]) {
        cout << sum[x] << '\n';
        continue;
      }
      long long res = 0;
      for (auto j : heavy) res += 1LL * com[x][w[j]] * sum_aft[j];
      for (auto j : s[x]) res += a[j];
      cout << res << '\n';
    }
  }
  return 0;
}
