#include <bits/stdc++.h>
using namespace std;
bool debug = false;
int n, m, k;
int dx[4] = {0, 1, 0, -1}, dy[4] = {1, 0, -1, 0};
long long ln, lk, lm;
long long a[100005], ans[100005], cnt[100005];
int q, qn;
vector<int> st[100005], heavy, H[100005], insec[100005];
int main() {
  scanf("%d%d%d", &n, &m, &q);
  for (int(i) = 1; (i) <= (int)(n); (i)++) {
    scanf("%lld", a + i);
  }
  qn = sqrt(n);
  for (int(i) = 1; (i) <= (int)(m); (i)++) {
    scanf("%d", &k);
    st[i].resize(k);
    bool hy = k > qn;
    if (hy) {
      heavy.push_back(i);
      H[i].resize(n + 1);
    }
    for (int(j) = 0; (j) < (int)(k); (j)++) {
      scanf("%d", &st[i][j]);
      if (hy) {
        H[i][st[i][j]] = 1;
        ans[i] += a[st[i][j]];
      }
    }
  }
  for (int(i) = 1; (i) <= (int)(m); (i)++) {
    insec[i].resize(heavy.size());
    for (int j = 0; j < heavy.size(); j++) {
      int id = heavy[j];
      int x = 0;
      for (int c : st[i])
        if (H[id][c]) x++;
      insec[i][j] = x;
    }
  }
  char ope[3];
  int x;
  for (int(i) = 0; (i) < (int)(q); (i)++) {
    scanf("%s", ope);
    if (ope[0] == '+') {
      scanf("%d%d", &k, &x);
      if (H[k].empty()) {
        for (int c : st[k]) a[c] += x;
        for (int j = 0; j < heavy.size(); j++) ans[heavy[j]] += x * insec[k][j];
      } else {
        cnt[k] += x;
      }
    } else {
      scanf("%d", &k);
      long long aa = 0;
      if (H[k].empty()) {
        for (int c : st[k]) aa += a[c];
        for (int j = 0; j < heavy.size(); j++)
          aa += cnt[heavy[j]] * insec[k][j];
      } else {
        aa = ans[k];
        for (int j = 0; j < heavy.size(); j++)
          aa += cnt[heavy[j]] * insec[k][j];
      }
      printf("%lld\n", aa);
    }
  }
  return 0;
}
