#include <bits/stdc++.h>
using namespace std;
using ll = long long;
constexpr int kSq = 350;
int n;
vector<ll> a;
struct block;
vector<block> blocks;
struct block {
  bool small;
  vector<int> indices;
  unordered_map<int, int> bigs;
  ll cur_sum = 0, my_change = 0, o_change = 0;
  ll sum() {
    if (!small) {
      return cur_sum + my_change * indices.size() + o_change;
    }
    ll res = 0;
    for (int idx : indices) {
      res += a[idx];
    }
    for (const auto& p : bigs) {
      res += p.second * blocks[p.first].my_change;
    }
    return res;
  }
  void add(ll v) {
    for (const auto& p : bigs) {
      blocks[p.first].o_change += p.second * v;
    }
    if (small) {
      for (int idx : indices) {
        a[idx] += v;
      }
      return;
    }
    my_change += v;
  }
};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int m, q;
  cin >> n >> m >> q;
  a.resize(n);
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  vector<unordered_set<int>> sets(m);
  vector<int> bigs;
  blocks.resize(m);
  for (int i = 0; i < m; ++i) {
    int k;
    cin >> k;
    auto& cur_set = sets[i];
    vector<int> indices(k);
    ll sum = 0;
    for (int j = 0; j < k; ++j) {
      cin >> indices[j];
      --indices[j];
      sum += a[indices[j]];
      cur_set.emplace(indices[j]);
    }
    if (k > kSq) {
      bigs.emplace_back(i);
      blocks[i].small = false;
    } else {
      blocks[i].small = true;
    }
    blocks[i].indices = move(indices);
    blocks[i].cur_sum = sum;
  }
  for (int i = 0; i < m; ++i) {
    unordered_map<int, int> counts;
    for (int idx : blocks[i].indices) {
      for (int big : bigs) {
        if (i != big && sets[big].count(idx)) {
          ++counts[big];
        }
      }
    }
    blocks[i].bigs = move(counts);
  }
  while (q--) {
    char type;
    int k;
    cin >> type >> k;
    --k;
    if (type == '?') {
      cout << blocks[k].sum() << '\n';
    } else if (type == '+') {
      int x;
      cin >> x;
      blocks[k].add(x);
    } else {
      assert(false);
    }
  }
  return 0;
}
