#include <bits/stdc++.h>
using namespace std;
const int maxn = 100009;
const int SQRT = 320;
long long a[maxn];
vector<int> S[maxn];
int num[maxn];
long long sum[SQRT];
long long delta[SQRT];
int cnt;
bool isInSet[maxn][SQRT];
int common[maxn][SQRT];
int main() {
  int n, m, q;
  scanf("%d %d %d", &n, &m, &q);
  for (int i = 1; i <= n; i++) {
    scanf("%I64d", a + i);
  }
  for (int i = 1; i <= m; i++) {
    int sz;
    scanf("%d", &sz);
    if (sz > SQRT) {
      num[i] = cnt;
      cnt++;
    }
    for (int j = 0; j < sz; j++) {
      int k;
      scanf("%d", &k);
      S[i].push_back(k);
      if (sz > SQRT) {
        isInSet[k][num[i]] = true;
        sum[num[i]] += a[k];
      }
    }
  }
  for (int i = 1; i <= m; i++) {
    for (int t = 0; t < cnt; t++) {
      for (int k : S[i]) {
        if (isInSet[k][t]) {
          common[i][t]++;
        }
      }
    }
  }
  while (q--) {
    char type;
    scanf(" %c", &type);
    if (type == '?') {
      int j;
      scanf("%d", &j);
      long long ans = 0;
      for (int t = 0; t < cnt; t++) {
        ans += delta[t] * (long long)common[j][t];
      }
      if (S[j].size() <= SQRT) {
        for (int k : S[j]) ans += a[k];
      } else {
        ans += sum[num[j]];
      }
      cout << ans << endl;
    } else {
      int j;
      long long x;
      scanf("%d %I64d", &j, &x);
      if (S[j].size() > SQRT) {
        delta[num[j]] += x;
      } else {
        for (int k : S[j]) a[k] += x;
        for (int t = 0; t < cnt; t++) {
          sum[t] += x * (long long)common[j][t];
        }
      }
    }
  }
}
