#include <bits/stdc++.h>
using namespace std;
const int MAX = 100 * 1000 + 1;
long long A[MAX], sum[MAX], bond[MAX];
vector<int> S[MAX], adj[MAX], to[MAX], heavy;
int n, m, q;
int blkSize;
void update(int k, int x) {
  if (((int)S[k].size()) < blkSize) {
    for (int pos : S[k]) A[pos] += x;
  } else {
    bond[k] += x;
  }
  for (int i = 0; i < (((int)heavy.size())); i++) {
    int h = heavy[i];
    vector<int>& adj = ::adj[i];
    sum[h] += x * 1LL * adj[k];
  }
}
long long solve(int k) {
  long long ret = 0;
  if (((int)S[k].size()) < blkSize) {
    for (int pos : S[k]) ret += A[pos];
    for (int i = 0; i < (((int)heavy.size())); i++) {
      int h = heavy[i];
      vector<int>& adj = ::adj[i];
      ret += bond[h] * adj[k];
    }
  } else
    ret = sum[k];
  return ret;
}
int main() {
  scanf("%d %d %d", &n, &m, &q);
  blkSize = sqrt(n) + 1;
  for (int i = 0; i < (n); i++) scanf("%lld", A + i);
  for (int i = 0; i < (m); i++) {
    int k;
    scanf("%d", &k);
    S[i] = vector<int>(k, 0);
    for (int j = 0; j < (k); j++) {
      int x;
      scanf("%d", &x);
      x--;
      S[i][j] = x;
      sum[i] += A[x];
      to[x].push_back(i);
    }
    if (k >= blkSize) heavy.push_back(i);
  }
  for (int i = 0; i < (((int)heavy.size())); i++) {
    int h = heavy[i];
    adj[i] = vector<int>(n, 0);
    for (int x : S[h]) {
      for (int y : to[x]) adj[i][y]++;
    }
  }
  for (int i = 0; i < (q); i++) {
    char c;
    int k;
    scanf(" %c %d", &c, &k);
    k--;
    if (c == '?')
      printf("%lld\n", solve(k));
    else {
      int x;
      scanf("%d", &x);
      update(k, x);
    }
  }
  return 0;
}
