#include <bits/stdc++.h>
using namespace std;
typedef struct {
  int id;
  long long d;
  bool contains[100005];
} HEAVYSET;
long long a[100005];
vector<vector<int> > sets;
vector<HEAVYSET> hsets;
int hindx[100005];
int inst[100005][325];
long long sum[100005];
int main() {
  int n, m, q;
  cin >> n >> m >> q;
  for (int i = 1; i <= n; ++i) cin >> a[i];
  int ss, tmp;
  for (int i = 0; i < m; ++i) {
    cin >> ss;
    sets.push_back(vector<int>());
    vector<int>& s = sets[sets.size() - 1];
    for (int j = 0; j < ss; ++j) {
      cin >> tmp;
      s.push_back(tmp);
      sum[i] += a[tmp];
    }
    if (ss >= 325) {
      hsets.push_back(HEAVYSET());
      HEAVYSET& hset = hsets[hsets.size() - 1];
      hset.id = i;
      hset.d = 0;
      memset(hset.contains, 0, sizeof(hset.contains));
      for (int j = 0; j < s.size(); ++j) {
        hset.contains[s[j]] = true;
      }
      hindx[i] = hsets.size() - 1;
    }
  }
  for (int i = 0; i < sets.size(); ++i) {
    for (int j = 0; j < hsets.size(); ++j) {
      for (int k = 0; k < sets[i].size(); ++k) {
        if (hsets[j].contains[sets[i][k]]) ++inst[i][j];
      }
    }
  }
  char qt;
  int k;
  long long x;
  for (int i = 0; i < q; ++i) {
    cin >> qt >> k;
    --k;
    vector<int>& s = sets[k];
    int ss = s.size();
    if (qt == '?') {
      long long ans = 0;
      if (ss < 325)
        for (int j = 0; j < ss; ++j) ans += a[s[j]];
      else
        ans = sum[k];
      for (int j = 0; j < hsets.size(); ++j) ans += hsets[j].d * inst[k][j];
      cout << ans << endl;
    } else {
      cin >> x;
      if (ss < 325) {
        for (int j = 0; j < ss; ++j) a[s[j]] += x;
        for (int j = 0; j < hsets.size(); ++j)
          sum[hsets[j].id] += x * inst[k][j];
      } else {
        hsets[hindx[k]].d += x;
      }
    }
  }
  return 0;
}
