#include <bits/stdc++.h>
#pragma GCC optimize("-O3")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
using namespace std;
const long long MOD = 1e9 + 7;
const long long INF = 1e18;
const long double E = 1e-8;
mt19937_64 rnd(time(0));
long long p1 = 31, p2 = 29, p3 = 7, p4 = rnd() % 100 + 1, md1 = MOD,
          md2 = 998244353, md3 = 998244357, md4 = rnd() % 1000000000;
long long n, m, k, h, T, a[100001], pls[100001], ans[100001];
int tt[100001];
vector<long long> v[100001];
int intr[317][100001];
bool tf[317][100001];
vector<long long> w;
long long binpow(long long h, long long r, long long md = MOD) {
  long long l = 1;
  while (r) {
    if (r & 1) l *= h, l %= md;
    h *= h;
    h %= md;
    r /= 2;
  }
  return l;
}
long long gcd(long long x, long long y) {
  if (x < y) swap(x, y);
  while (x && y) {
    x %= y;
    swap(x, y);
  }
  return x + y;
}
struct dsu {
  long long d[200001];
  void make_set(int h) { d[h] = h; }
  long long find_set(int h) {
    if (h == d[h])
      return h;
    else
      return d[h] = find_set(d[h]);
  }
  void unite_sets(int x, int y) {
    x = find_set(x);
    y = find_set(y);
    if (x < y) swap(x, y);
    d[x] = y;
  }
};
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long q;
  cin >> n >> m >> q;
  for (int i = 1; i <= n; i++) cin >> a[i];
  long long p = sqrt(n);
  for (int i = 0; i < m; i++) {
    long long x;
    cin >> x;
    if (p < x) {
      tt[i] = w.size();
      w.push_back(i);
    } else
      tt[i] = -1;
    for (int j = 0; j < x; j++) {
      long long y;
      cin >> y;
      v[i].push_back(y);
      if (tt[i] != -1) {
        tf[w.size() - 1][y] = 1;
        ans[tt[i]] += a[y];
      }
    }
  }
  for (int i = 0; i < m; i++)
    for (int j = 0; j < w.size(); j++)
      for (int u = 0; u < v[i].size(); u++) intr[j][i] += tf[j][v[i][u]];
  for (int i = 0; i < q; i++) {
    char c;
    cin >> c;
    if (c == '+') {
      long long x, y;
      cin >> x >> y;
      x--;
      if (tt[x] != -1) {
        pls[x] += y;
      } else {
        for (int i = 0; i < v[x].size(); i++) a[v[x][i]] += y;
        for (int i = 0; i < w.size(); i++) ans[i] += y * intr[i][x];
      }
    } else {
      long long x, y;
      cin >> x;
      x--;
      if (tt[x] != -1) {
        long long an = ans[tt[x]];
        for (int i = 0; i < w.size(); i++) an += intr[i][x] * pls[w[i]];
        cout << an << "\n";
      } else {
        long long an = 0;
        for (int i = 0; i < v[x].size(); i++) an += a[v[x][i]];
        for (int i = 0; i < w.size(); i++) an += intr[i][x] * pls[w[i]];
        cout << an << "\n";
      }
    }
  }
  return 0;
}
