#include <bits/stdc++.h>
const int N = 100000 + 10;
const int B = 320;
int n, m, q;
long long a[N];
std::vector<int> s[N];
int id[N];
int ip[B], in;
int interact[B][N];
long long sum[B], mark[B];
void init() {
  static bool c[N];
  std::vector<int>::iterator it;
  int i, j, k;
  for (k = 1; k <= in; k++) {
    i = ip[k];
    for (it = s[i].begin(); it != s[i].end(); it++) sum[k] += a[*it];
    for (it = s[i].begin(); it != s[i].end(); it++) c[*it] = true;
    for (j = 1; j <= m; j++)
      for (it = s[j].begin(); it != s[j].end(); it++) interact[k][j] += c[*it];
    for (it = s[i].begin(); it != s[i].end(); it++) c[*it] = false;
  }
}
void add(int x, int y) {
  int i;
  std::vector<int>::iterator it;
  for (i = 1; i <= in; i++) sum[i] += 1LL * interact[i][x] * y;
  if (id[x])
    mark[id[x]] += y;
  else
    for (it = s[x].begin(); it != s[x].end(); it++) a[*it] += y;
}
long long query(int x) {
  int i;
  std::vector<int>::iterator it;
  long long ans = 0;
  if (id[x]) return sum[id[x]];
  for (it = s[x].begin(); it != s[x].end(); it++) ans += a[*it];
  for (i = 1; i <= in; i++) ans += 1LL * interact[i][x] * mark[i];
  return ans;
}
int main() {
  int i, j, k, x, y;
  char opt;
  scanf("%d %d %d", &n, &m, &q);
  for (i = 1; i <= n; i++) scanf("%lld", &a[i]);
  for (i = 1; i <= m; i++) {
    scanf("%d", &k);
    if (k >= B) {
      in++;
      ip[in] = i;
      id[i] = in;
    }
    for (j = 1; j <= k; j++) {
      scanf("%d", &x);
      s[i].push_back(x);
    }
  }
  init();
  for (i = 1; i <= q; i++) {
    scanf(" %c %d", &opt, &x);
    if (opt == '+') {
      scanf("%d", &y);
      add(x, y);
    } else
      printf("%lld\n", query(x));
  }
  return 0;
}
