#include <bits/stdc++.h>
using namespace std;
int n, m, q;
int nr;
vector<long long> a;
vector<int> idx;
vector<vector<int> > heavy_set;
vector<vector<int> > light_set;
vector<vector<bool> > tb;
vector<vector<int> > hh;
vector<vector<int> > lh;
vector<long long> hd;
vector<long long> hr;
int i_sqrt(int n) {
  int lo = 1, hi = n + 1;
  int mid;
  while (lo < hi) {
    mid = lo + (hi - lo) / 2;
    if (mid <= n / mid) {
      lo = mid + 1;
    } else {
      hi = mid;
    }
  }
  return lo;
}
void readin() {
  scanf("%d%d%d", &n, &m, &q);
  nr = i_sqrt(n);
  a.resize(n);
  for (int i = 0; i < n; ++i) {
    scanf("%I64d", &a[i]);
  }
  heavy_set.clear();
  light_set.clear();
  idx.clear();
  for (int i = 0, j; i < m; ++i) {
    scanf("%d", &j);
    vector<vector<int> > &vs = j >= nr ? heavy_set : light_set;
    vs.push_back(vector<int>(j));
    idx.push_back(j >= nr ? (((heavy_set.size() - 1) << 1) | 1)
                          : (((light_set.size() - 1) << 1) | 0));
    vector<int> &v = *(vs.end() - 1);
    while (j--) {
      scanf("%d", &v[j]);
      --v[j];
    }
  }
  tb.clear();
  tb.resize(n, vector<bool>(heavy_set.size()));
  hr.clear();
  hr.resize(heavy_set.size(), 0);
  for (vector<vector<int> >::iterator it = heavy_set.begin();
       it != heavy_set.end(); ++it) {
    for (vector<int>::iterator it_ = it->begin(); it_ != it->end(); ++it_) {
      tb[*it_][it - heavy_set.begin()] = true;
      hr[it - heavy_set.begin()] += a[*it_];
    }
  }
}
int f(vector<int> const &v, int h) {
  int ret = 0;
  for (vector<int>::const_iterator it = v.begin(); it != v.end(); ++it) {
    if (tb[*it][h]) {
      ++ret;
    }
  }
  return ret;
}
void calculate_intersection() {
  lh.clear();
  lh.resize(light_set.size(), vector<int>(heavy_set.size()));
  for (vector<vector<int> >::iterator it = light_set.begin();
       it != light_set.end(); ++it) {
    for (int i = 0; i < int(heavy_set.size()); ++i) {
      lh[it - light_set.begin()][i] = f(*it, i);
    }
  }
  hh.clear();
  hh.resize(heavy_set.size(), vector<int>(heavy_set.size()));
  for (vector<vector<int> >::iterator it = heavy_set.begin();
       it != heavy_set.end(); ++it) {
    for (int i = 0; i < int(heavy_set.size()); ++i) {
      hh[it - heavy_set.begin()][i] = f(*it, i);
    }
  }
}
void add_heavy(int id, long long d) { hd[id] += d; }
void add_light(int id, long long d) {
  for (vector<int>::iterator it = light_set[id].begin();
       it != light_set[id].end(); ++it) {
    a[*it] += d;
  }
  for (int h = 0; h < int(heavy_set.size()); ++h) {
    hr[h] += d * lh[id][h];
  }
}
long long query_heavy(int id) {
  long long ret = hr[id];
  for (int h = 0; h < int(heavy_set.size()); ++h) {
    ret += hd[h] * hh[id][h];
  }
  return ret;
}
long long query_light(int id) {
  long long ret = 0;
  for (vector<int>::iterator it = light_set[id].begin();
       it != light_set[id].end(); ++it) {
    ret += a[*it];
  }
  for (int h = 0; h < int(heavy_set.size()); ++h) {
    ret += hd[h] * lh[id][h];
  }
  return ret;
}
int main() {
  readin();
  calculate_intersection();
  char op[10];
  int id, d;
  hd.clear();
  hd.resize(heavy_set.size(), 0);
  while (q--) {
    scanf("%s", op);
    if (op[0] == '+') {
      scanf("%d%d", &id, &d);
      ((idx[id - 1] & 1) != 0) ? add_heavy(idx[id - 1] >> 1, d)
                               : add_light(idx[id - 1] >> 1, d);
    } else {
      scanf("%d", &id);
      printf("%I64d\n", ((idx[id - 1] & 1) != 0)
                            ? query_heavy(idx[id - 1] >> 1)
                            : query_light(idx[id - 1] >> 1));
    }
  }
  return 0;
}
