#include <bits/stdc++.h>
using namespace std;
const int SIZE = 1e5 + 10;
int n, m, q;
int K, T;
long long a[SIZE], acc[SIZE], add[SIZE];
int idx[SIZE], intersec[SIZE][350];
vector<long long> s[SIZE], t[SIZE];
int vis[SIZE];
void query() {
  while (q--) {
    char c;
    int x, y;
    cin >> c >> x;
    x = idx[x - 1];
    if (c == '?') {
      long long ret = 0;
      if (x >= T) {
        for (int i = 0; i < (int)(s[x].size()); i++) ret += a[s[x][i]];
        for (int i = 0; i < (int)(T); i++) ret += add[i] * intersec[x][i];
      } else {
        ret += acc[x];
        for (int i = 0; i < (int)(T); i++) ret += add[i] * intersec[x][i];
      }
      cout << ret << endl;
    } else {
      cin >> y;
      if (x >= T) {
        for (int i = 0; i < (int)(s[x].size()); i++) a[s[x][i]] += y;
        for (int i = 0; i < (int)(T); i++) acc[i] += y * intersec[x][i];
      } else {
        add[x] += y;
      }
    }
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n >> m >> q;
  for (int i = 0; i < (int)(n); i++) cin >> a[i];
  for (int i = 0; i < (int)(m); i++) {
    int k;
    cin >> k;
    t[i].resize(k);
    for (int j = 0; j < (int)(k); j++) {
      cin >> t[i][j];
      --t[i][j];
    }
    if (k > 330) {
      idx[i] = K;
      for (int j = 0; j < (int)(k); j++) acc[K] += a[t[i][j]];
      s[K++] = t[i];
    }
  }
  T = K;
  for (int i = 0; i < (int)(m); i++)
    if (t[i].size() <= 330) {
      idx[i] = K;
      s[K++] = t[i];
    }
  int cookie = 0;
  for (int i = 0; i < (int)(T); i++) {
    ++cookie;
    for (int j = 0; j < (int)(s[i].size()); j++) vis[s[i][j]] = cookie;
    for (int j = 0; j < (int)(m); j++)
      for (int k = 0; k < (int)(s[j].size()); k++)
        if (vis[s[j][k]] == cookie) ++intersec[j][i];
  }
  query();
  return 0;
}
