#include <bits/stdc++.h>
using namespace std;
vector<int> v[100005];
int n, m, x, y, z, k, w;
long long A[100005], set_value[100005], add_value[100005];
int heavy_set_id[300];
char s[2];
int heavy_set_arr[300][100005];
int intersect[100005][300];
int main() {
  int Q;
  scanf("%d %d %d", &n, &m, &Q);
  for (int i = (1); i <= (n); i++) scanf("%lld", &A[i]);
  for (int i = (1); i <= (m); i++) {
    scanf("%d", &k);
    for (int j = (0); j < (k); j++) {
      scanf("%d", &x);
      v[i].push_back(x);
      set_value[i] += A[x];
      if (k >= 340) heavy_set_arr[w][x] = 1;
    }
    if (k >= 340) heavy_set_id[w++] = i;
  }
  for (int i = (1); i <= (m); i++) {
    for (int j = (0); j < (v[i].size()); j++) {
      x = v[i][j];
      for (int k = (0); k < (w); k++)
        if (heavy_set_arr[k][x] == 1) intersect[i][k]++;
    }
  }
  long long add;
  long long ans;
  while (Q--) {
    scanf("%s", s);
    if (s[0] == '+') {
      scanf("%d %lld", &x, &add);
      if (v[x].size() < 340) {
        for (int i = (0); i < (v[x].size()); i++) A[v[x][i]] += add;
      } else {
        add_value[x] += add;
      }
      for (int i = (0); i < (w); i++) {
        set_value[heavy_set_id[i]] += add * (long long)intersect[x][i];
      }
    } else {
      scanf("%d", &x);
      ans = 0ll;
      if (v[x].size() < 340) {
        for (int i = (0); i < (v[x].size()); i++) ans += A[v[x][i]];
        for (int i = (0); i < (w); i++)
          ans += add_value[heavy_set_id[i]] * (long long)intersect[x][i];
      } else {
        ans = set_value[x];
      }
      printf("%lld\n", ans);
    }
  }
  return 0;
}
