#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 7;
const int inf = 0x3f3f3f3f;
const long long INF = 0x3f3f3f3f3f3f3f3f;
const int mod = 998244353;
const double eps = 1e-8;
const double PI = acos(-1);
template <class T, class S>
inline void add(T& a, S b) {
  a += b;
  if (a >= mod) a -= mod;
}
template <class T, class S>
inline void sub(T& a, S b) {
  a -= b;
  if (a < 0) a += mod;
}
template <class T, class S>
inline bool chkmax(T& a, S b) {
  return a < b ? a = b, true : false;
}
template <class T, class S>
inline bool chkmin(T& a, S b) {
  return a > b ? a = b, true : false;
}
const int B = 350;
int n, m, q;
long long a[N];
int cnt[307][N];
int cnt2[307][307];
long long sum[N], addval[N];
int to[N];
int fto[N];
vector<int> S[N];
vector<int> big, sml;
vector<int> vc[N];
int main() {
  scanf("%d%d%d", &n, &m, &q);
  for (int i = 1; i <= n; i++) scanf("%lld", &a[i]);
  for (int i = 1; i <= m; i++) {
    int num;
    scanf("%d", &num);
    S[i].resize(num);
    for (int j = 0; j < num; j++) scanf("%d", &S[i][j]);
    if (num >= B)
      to[i] = ((int)big.size()), fto[((int)big.size())] = i, big.push_back(i);
    else
      to[i] = ((int)sml.size()), fto[((int)sml.size())] = i, sml.push_back(i);
  }
  for (int i = 0; i < ((int)big.size()); i++) {
    for (auto& x : S[big[i]]) {
      vc[x].push_back(i);
      sum[fto[i]] += a[x];
    }
  }
  for (int i = 0; i < ((int)sml.size()); i++) {
    for (auto& x : S[sml[i]]) {
      for (auto& y : vc[x]) {
        cnt[y][i]++;
      }
    }
  }
  for (int i = 0; i < ((int)big.size()); i++) {
    for (auto& x : S[big[i]]) {
      for (auto& y : vc[x]) {
        if (i < y) cnt2[i][y]++, cnt2[y][i]++;
      }
    }
  }
  while (q--) {
    char op[3];
    scanf("%s", op);
    if (op[0] == '+') {
      int k, x;
      scanf("%d%d", &k, &x);
      if (((int)S[k].size()) >= B) {
        sum[k] += 1LL * ((int)S[k].size()) * x;
        addval[k] += x;
        for (int i = 0; i < ((int)big.size()); i++) {
          if (to[k] == i) continue;
          sum[fto[i]] += 1LL * x * cnt2[to[k]][i];
        }
      } else {
        for (auto& id : S[k]) a[id] += x;
        for (int i = 0; i < ((int)big.size()); i++)
          sum[fto[i]] += 1LL * cnt[i][to[k]] * x;
      }
    } else {
      int k;
      scanf("%d", &k);
      if (((int)S[k].size()) >= B) {
        printf("%lld\n", sum[k]);
      } else {
        long long ans = 0;
        for (auto& x : S[k]) ans += a[x];
        for (int i = 0; i < ((int)big.size()); i++)
          ans += addval[fto[i]] * cnt[i][to[k]];
        printf("%lld\n", ans);
      }
    }
  }
  return 0;
}
