#include <bits/stdc++.h>
using namespace std;
const int MAXB = 310;
const int MAXN = 1e5 + 100;
const int MAXC = (MAXN + MAXB - 1) / MAXB;
int x, y, intercnt[MAXN][MAXC], f[MAXN];
long long bar[MAXC], res[MAXC], a[MAXN];
vector<int> S[MAXN], Heavy, Light;
bool vis[MAXC][MAXN];
int main() {
  int n, m, q;
  cin >> n >> m >> q;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (int i = 0; i < m; i++) {
    cin >> x;
    for (int j = 0; j < x; j++) {
      cin >> y;
      y--;
      S[i].push_back(y);
    }
    if (x > MAXB) {
      Heavy.push_back(i);
      f[i] = Heavy.size() - 1;
      for (int j = 0; j < x; j++) {
        vis[f[i]][S[i][j]] = 1;
        res[f[i]] += a[S[i][j]];
      }
      continue;
    }
    Light.push_back(i);
  }
  for (int i = 0; i < m; i++) {
    for (int j = 0; j < Heavy.size(); j++) {
      int t = Heavy[j];
      for (int r = 0; r < S[i].size(); r++) {
        if (vis[j][S[i][r]]) {
          intercnt[i][j]++;
        }
      }
    }
  }
  char c;
  int t;
  for (int i = 0; i < q; i++) {
    cin >> c;
    if (c == '+') {
      cin >> t >> x;
      t--;
      if (S[t].size() > MAXB) {
        bar[f[t]] += x;
      } else {
        for (int j = 0; j < S[t].size(); j++) {
          a[S[t][j]] += x;
        }
        for (int j = 0; j < Heavy.size(); j++) {
          res[j] += (1ll * intercnt[t][j] * x);
        }
      }
    }
    if (c == '?') {
      cin >> t;
      t--;
      long long ans = 0;
      for (int j = 0; j < Heavy.size(); j++) {
        ans += (1ll * intercnt[t][j] * bar[j]);
      }
      if (S[t].size() > MAXB) {
        cout << ans + res[f[t]] << endl;
      } else {
        for (int j = 0; j < S[t].size(); j++) {
          ans += a[S[t][j]];
        }
        cout << ans << endl;
      }
    }
  }
}
