#include <bits/stdc++.h>
using namespace std;
long long A[100008], sz, id, ROOT = 320;
int n, m, q;
vector<int> heavy;
int has[320][100008];
struct Set {
  int type;
  vector<int> el;
  int inter[320];
  long long val, cnt;
  void read(int v) {
    val = cnt = 0;
    scanf("%lld", &sz);
    type = (sz > ROOT);
    if (type) heavy.push_back(v);
    for (int i = 0; i < sz; i++) {
      scanf("%lld", &id);
      id--;
      if (type) has[heavy.size() - 1][id] = 1;
      el.push_back(id);
      val += A[id];
    }
  }
} INP[100005];
void inters(int v) {
  for (int i = 0; i < heavy.size(); i++) {
    INP[v].inter[i] = 0;
    for (int j = 0; j < INP[v].el.size(); j++) {
      if (has[i][INP[v].el[j]]) INP[v].inter[i]++;
    }
  }
}
void update(int v) {
  long long x;
  scanf("%lld", &x);
  if (INP[v].type == 1)
    INP[v].cnt += x;
  else
    for (int i = 0; i < INP[v].el.size(); i++) A[INP[v].el[i]] += x;
  for (int i = 0; i < heavy.size(); i++) {
    INP[heavy[i]].val += ((long long)INP[v].inter[i] * x);
  }
}
long long answer(int v) {
  if (INP[v].type == 1)
    return INP[v].val;
  else {
    long long ret = 0;
    for (int i = 0; i < INP[v].el.size(); i++) ret += A[INP[v].el[i]];
    for (int i = 0; i < heavy.size(); i++) {
      ret += INP[heavy[i]].cnt * INP[v].inter[i];
    }
    return ret;
  }
}
int main() {
  scanf("%d %d %d", &n, &m, &q);
  for (int i = 0; i < n; i++) scanf("%lld", &A[i]);
  for (int i = 0; i < m; i++) INP[i].read(i);
  for (int i = 0; i < m; i++) inters(i);
  char c;
  while (q--) {
    cin >> c >> id;
    if (c == '+')
      update(id - 1);
    else
      printf("%lld\n", answer(id - 1));
  }
  return 0;
}
