#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("Ofast,no-stack-protector")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("unroll-loops")
template <class T>
inline T bigMod(T p, T e, T M) {
  T ret = 1;
  for (; e > 0; e >>= 1) {
    if (e & 1) ret = (ret * p) % M;
    p = (p * p) % M;
  }
  return (T)ret;
}
template <class T>
inline T modInverse(T a, T M) {
  return bigMod(a, M - 2, M);
}
template <class T>
inline T gcd(T a, T b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
template <class T>
inline T lcm(T a, T b) {
  a = abs(a);
  b = abs(b);
  return (a / gcd(a, b)) * b;
}
template <class T>
inline string int2String(T a) {
  ostringstream str;
  str << a;
  return str.str();
}
const int dr[] = {0, 1, 0, -1, -1, 1, 1, -1, -2, -2, 2, 2, -1, -1, 1, 1};
const int dc[] = {1, 0, -1, 0, 1, 1, -1, -1, -1, 1, -1, 1, -2, 2, -2, 2};
const int maxn = 1e5 + 5, _SQRT = 256;
int common[maxn][_SQRT], heavy_index[maxn];
long long a[maxn], lazy[_SQRT], sum[_SQRT];
vector<int> s[maxn], heavy;
bool has[_SQRT][maxn];
int main() {
  int n, m, q;
  scanf("%d%d%d", &n, &m, &q);
  for (int i = int(0); i < int(n); ++i) scanf("%lld", &a[i]);
  int sz, idx;
  memset(heavy_index, -1, sizeof(heavy_index));
  heavy.reserve(_SQRT);
  for (int k = int(0); k < int(m); ++k) {
    scanf("%d", &sz);
    if (sz > _SQRT) {
      heavy_index[k] = heavy.size();
      heavy.push_back(heavy.size());
    }
    s[k].assign(sz, 0);
    for (int i = int(0); i < int(sz); ++i) {
      scanf("%d", &idx), --idx;
      s[k][i] = idx;
      if (~heavy_index[k]) {
        has[heavy_index[k]][idx] = 1;
        sum[heavy_index[k]] += a[idx];
      }
    }
  }
  for (int i = int(0); i < int(m); ++i) {
    for (const int &k : heavy) {
      for (const int &index : s[i]) {
        common[i][k] += has[k][index];
      }
    }
  }
  int k, x;
  char ch[10];
  while (q--) {
    scanf("%s%d", ch, &k), --k;
    if (ch[0] == '+') {
      scanf("%d", &x);
      if (~heavy_index[k]) {
        lazy[heavy_index[k]] += x;
      } else {
        for (const int &index : s[k]) a[index] += x;
        for (const int &index : heavy) sum[index] += 1LL * x * common[k][index];
      }
    } else {
      long long res = 0;
      if (~heavy_index[k]) {
        res = sum[heavy_index[k]];
      } else {
        for (const int &index : s[k]) res += a[index];
      }
      for (const int &index : heavy) res += common[k][index] * lazy[index];
      printf("%lld\n", res);
    }
  }
  return 0;
}
