#include <bits/stdc++.h>
using namespace std;
vector<int> big;
vector<int> s[100010];
vector<int> pos[100010];
unsigned int h[100010], n, m, q;
int same[320][100010];
unsigned int BND;
long long a[100010], sum[100010], add[100010];
void Debug() {
  unsigned int i, j;
  printf("light:\n");
  for (i = 0; i < m; i++) {
    for (j = 0; j < s[i].size(); j++) {
      if (j) printf(" ");
      printf("%I64d", a[s[i][j]]);
    }
    if (s[i].size() > BND)
      printf(" heavy\n");
    else
      printf(" light\n");
  }
  printf("\n");
  for (i = 0; i < big.size(); i++)
    for (j = 0; j < m; j++) printf("same:%d %d= %d\n", h[i], j, same[i][j]);
}
int main() {
  unsigned int i, j, k;
  scanf("%d%d%d", &n, &m, &q);
  BND = sqrt(n);
  for (i = 0; i < n; i++) scanf("%I64d", &a[i]);
  for (i = 0; i < m; i++) {
    unsigned int cnt;
    scanf("%d", &cnt);
    for (j = 0; j < cnt; j++) {
      int tmp;
      scanf("%d", &tmp);
      tmp--;
      s[i].push_back(tmp);
      pos[tmp].push_back(i);
      sum[i] += a[tmp];
    }
  }
  for (i = 0; i < m; i++)
    if (s[i].size() > BND) {
      big.push_back(i);
      h[big.size() - 1] = i;
      for (j = 0; j < s[i].size(); j++) {
        int tmp = s[i][j];
        for (k = 0; k < pos[tmp].size(); k++)
          same[big.size() - 1][pos[tmp][k]]++;
      }
    }
  char o[2];
  long long x;
  while (q--) {
    scanf("%s", o);
    if (o[0] == '+') {
      scanf("%d%I64d", &k, &x);
      k--;
      if (s[k].size() > BND) {
        add[k] += x;
        for (i = 0; i < big.size(); i++)
          if (h[i] != k) sum[h[i]] += x * (long long)(same[i][k]);
      } else {
        for (i = 0; i < s[k].size(); i++) a[s[k][i]] += x;
        for (i = 0; i < big.size(); i++)
          sum[h[i]] += x * (long long)(same[i][k]);
      }
    } else {
      scanf("%d", &k);
      k--;
      if (s[k].size() > BND) {
        long long ans = sum[k] + (long long)s[k].size() * add[k];
        printf("%I64d\n", ans);
      } else {
        long long ans = 0;
        for (i = 0; i < s[k].size(); i++) ans += a[s[k][i]];
        for (i = 0; i < big.size(); i++) ans += add[h[i]] * same[i][k];
        printf("%I64d\n", ans);
      }
    }
  }
  return 0;
}
