#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 2;
const int M = 320;
int n;
int m;
int q;
long long a[N];
int C;
vector<int> res[N];
long long ans[N];
long long pre[M];
int cur = 0;
int heavy[M];
int heavy_1[N];
bool is[M][N];
int com[N][M];
long long inc[M];
int main() {
  scanf("%d", &n);
  scanf("%d", &m);
  scanf("%d", &q);
  for (int i = 0; i < n; i++) scanf("%lld", &a[i]);
  C = sqrt(n);
  if (C * C < n) {
    C++;
  }
  int si;
  int num;
  int cur = 0;
  for (int i = 0; i < m; i++) {
    scanf("%d", &si);
    if (si > C) {
      heavy_1[i] = cur;
      heavy[cur] = i;
      cur++;
    }
    for (int j = 0; j < si; j++) {
      scanf("%d", &num);
      num--;
      res[i].emplace_back(num);
      if (si > C) {
        pre[cur - 1] += a[num];
        is[cur - 1][num] = true;
      }
    }
  }
  for (int i = 0; i < m; i++) {
    for (auto x : res[i]) {
      for (int j = 0; j < cur; j++) {
        if (is[j][x]) {
          com[i][j]++;
        }
      }
    }
  }
  char c;
  int k;
  long long x;
  while (q--) {
    cin >> c;
    if (c == '?') {
      scanf("%d", &k);
      k--;
      if (res[k].size() <= C) {
        long long ans = 0;
        for (auto x : res[k]) ans += (long long)a[x];
        for (int i = 0; i < cur; i++) {
          ans += (long long)inc[i] * (long long)com[k][i];
        }
        cout << ans << '\n';
      } else {
        long long ans = 0;
        k = heavy_1[k];
        ans = (long long)res[heavy[k]].size() * (long long)inc[k] +
              (long long)pre[k];
        for (int i = 0; i < cur; i++) {
          if (i != k) {
            ans += (long long)inc[i] * (long long)com[heavy[k]][i];
          }
        }
        cout << ans << '\n';
      }
    } else {
      scanf("%d", &k);
      scanf("%lld", &x);
      k--;
      if (res[k].size() <= C) {
        for (auto i : res[k]) a[i] += (long long)x;
        for (int i = 0; i < cur; i++) {
          pre[i] += (long long)x * (long long)com[k][i];
        }
      } else {
        int cur = heavy_1[k];
        inc[cur] += (long long)x;
      }
    }
  }
  return 0;
}
