#include <bits/stdc++.h>
using namespace std;
const int M = 1e5 + 5;
long long A[M], adj[320][M], v[M], id[M], sum[M];
vector<int> B[M], C[M];
int main() {
  int n, m, q;
  scanf("%d%d%d", &n, &m, &q);
  int N = sqrt(n);
  for (int j = 1; j <= n; j++) cin >> A[j];
  int light = 0, heavy = 0;
  for (int j = 1; j <= m; j++) {
    int K;
    scanf("%d", &K);
    for (int k = 1; k <= K; k++) {
      int a;
      scanf("%d", &a);
      B[a].push_back(j);
      C[j].push_back(a);
    }
    if (K >= N)
      id[j] = heavy++;
    else
      id[j] = light++;
  }
  for (int j = 1; j <= n; j++) {
    for (int x : B[j]) {
      if (C[x].size() >= N) {
        for (int y : B[j]) {
          adj[id[x]][y]++;
        }
      }
    }
  }
  for (int j = 1; j <= m; j++) {
    if (C[j].size() >= N) {
      for (int x : C[j]) {
        v[id[j]] += A[x];
      }
    }
  }
  while (q--) {
    char s[2];
    scanf("%s", s);
    int a;
    scanf("%d", &a);
    if (*s == '?') {
      long long ans;
      if (C[a].size() >= N)
        ans = v[id[a]];
      else {
        ans = 0;
        for (int j : C[a]) ans += A[j];
        for (int j = 0; j < heavy; j++) {
          ans += adj[j][a] * sum[j];
        }
      }
      cout << ans << endl;
    } else {
      int b;
      scanf("%d", &b);
      for (int j = 0; j < heavy; j++) v[j] += b * adj[j][a];
      if (C[a].size() >= N)
        sum[id[a]] += b;
      else
        for (int x : C[a]) A[x] += b;
    }
  }
  return 0;
}
