#include <bits/stdc++.h>
using namespace std;
bool is_heavy[100005];
long long ara[100005], intersection[318][100005], sum[100005], up[100005],
    sz[100005];
vector<long long> subset[100005], heavy;
char ch;
int main() {
  long long n, m, i, j, k, a, b, c, x, y, z, p, q, sq = sqrt(100000);
  cin >> n >> m >> q;
  for (i = 1; i <= n; i++) {
    scanf("%lld", &ara[i]);
  }
  for (i = 1; i <= m; i++) {
    scanf("%lld", &sz[i]);
    if (sz[i] > sq) {
      is_heavy[i] = true;
      heavy.push_back(i);
    } else {
      is_heavy[i] = false;
    }
    for (j = 0, z = 0; j < sz[i]; j++) {
      scanf("%lld", &a);
      z += ara[a];
      subset[i].push_back(a);
    }
    sum[i] = z;
    sort(subset[i].begin(), subset[i].end());
  }
  for (i = 1; i <= n; i++) {
    for (j = 0; j < heavy.size(); j++) {
      z = heavy[j];
      x = subset[i].size();
      y = subset[z].size();
      if (z == i) {
        intersection[j][i] = 0;
        continue;
      }
      if (x < y) {
        for (k = 0; k < x; k++) {
          if (binary_search(subset[z].begin(), subset[z].end(), subset[i][k]))
            intersection[j][i]++;
        }
      } else {
        for (k = 0; k < y; k++) {
          if (binary_search(subset[i].begin(), subset[i].end(), subset[z][k]))
            intersection[j][i]++;
        }
      }
    }
  }
  for (i = 0; i < q; i++) {
    scanf(" %c %lld", &ch, &a);
    if (ch == '+') {
      scanf("%lld", &b);
      if (is_heavy[a]) {
        up[a] += b;
        for (j = 0; j < heavy.size(); j++) {
          c = intersection[j][a];
          x = heavy[j];
          sum[x] += (c * b);
        }
      } else {
        for (j = 0; j < subset[a].size(); j++) {
          x = subset[a][j];
          ara[x] += b;
        }
        for (j = 0; j < heavy.size(); j++) {
          c = intersection[j][a];
          x = heavy[j];
          sum[x] += (c * b);
        }
      }
    } else {
      if (is_heavy[a]) {
        z = sum[a] + (up[a] * sz[a]);
        printf("%lld\n", z);
      } else {
        for (j = 0, z = 0; j < subset[a].size(); j++) {
          x = subset[a][j];
          z += ara[x];
        }
        for (j = 0; j < heavy.size(); j++) {
          x = heavy[j];
          y = intersection[j][a];
          z += (up[x] * y);
        }
        printf("%lld\n", z);
      }
    }
  }
  return 0;
}
