#include <bits/stdc++.h>
using namespace std;
const int MAX = 1e5 + 10;
const int SQRT = 317;
long long n, m, q;
long long a[MAX], p[MAX], sum[MAX];
vector<long long> s[MAX];
vector<long long> ho[MAX];
long long h[SQRT];
long long nh[MAX][SQRT];
bool heavy[MAX];
int main() {
  cin >> n >> m >> q;
  for (int i = 0; i < n; i++) cin >> a[i];
  int cnt = 0;
  for (int i = 0; i < m; i++) {
    int k, x;
    cin >> k;
    if (k > SQRT) {
      heavy[i] = true;
      h[cnt] = i;
      cnt++;
    }
    for (int j = 0; j < k; j++) {
      cin >> x;
      x--;
      if (heavy[i]) ho[x].push_back(cnt - 1);
      s[i].push_back(x);
    }
  }
  for (int i = 0; i < m; i++)
    for (int j = 0; j < s[i].size(); j++)
      for (int k = 0; k < ho[s[i][j]].size(); k++) nh[i][ho[s[i][j]][k]]++;
  for (int i = 0; i < m; i++)
    for (int j = 0; j < s[i].size(); j++) sum[i] += a[s[i][j]];
  while (q--) {
    char c;
    cin >> c;
    if (c == '+') {
      long long k, x;
      cin >> k >> x;
      k--;
      for (int i = 0; i < SQRT; i++) sum[h[i]] += x * nh[k][i];
      if (heavy[k])
        p[k] += x;
      else {
        for (int i = 0; i < s[k].size(); i++) a[s[k][i]] += x;
      }
    } else if (c == '?') {
      long long k, ans = 0;
      cin >> k;
      k--;
      if (heavy[k])
        ans = sum[k];
      else {
        for (int i = 0; i < s[k].size(); i++) ans += a[s[k][i]];
        for (int i = 0; i < SQRT; i++) ans += p[h[i]] * nh[k][i];
      }
      cout << ans << endl;
    }
  }
  return 0;
}
