#include <bits/stdc++.h>
using namespace std;
const long long inf = 0x20202020;
const long long mod = 1000000007;
const double eps = 1e-9;
const double pi = 3.1415926535897932384626;
const int DX[] = {1, 0, -1, 0}, DY[] = {0, 1, 0, -1};
long long powmod(long long a, long long b) {
  long long res = 1;
  a %= mod;
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
  }
  return res;
}
long long powmod(long long a, long long b, long long mod) {
  long long res = 1;
  a %= mod;
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
  }
  return res;
}
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
const int N = 101000, M = 320;
int n, m, q, s, u, p1;
char ty;
int fg[N];
long long ans[N], cnt[N], a[N], sm, p2;
int ps[320][N];
vector<int> p[N], bg;
int main() {
  scanf("%d%d%d", &n, &m, &q);
  for (int i = 1; i < (int)n + 1; i++) scanf("%I64d", a + i);
  for (int i = 1; i < (int)m + 1; i++) {
    scanf("%d ", &s);
    for (int j = 0; j < (int)s; j++) {
      scanf("%d ", &u);
      ans[i] += a[u];
      p[i].push_back(u);
    }
    if (s >= M) bg.push_back(i);
  }
  for (int i = 0; i < (int)((int)(bg).size()); i++) {
    int u = bg[i];
    for (int j = 0; j < (int)((int)(p[u]).size()); j++) fg[p[u][j]] = i + 1;
    for (int j = 1; j < (int)m + 1; j++) {
      for (int k = 0; k < (int)((int)(p[j]).size()); k++)
        ps[i][j] += (fg[p[j][k]] == i + 1);
    }
  }
  for (int i = 0; i < (int)q; i++) {
    scanf("%c", &ty);
    if (ty == '?') {
      scanf("%d ", &p1);
      if (((int)(p[p1]).size()) < M) {
        sm = 0;
        for (int j = 0; j < (int)((int)(p[p1]).size()); j++) sm += a[p[p1][j]];
        for (int j = 0; j < (int)((int)(bg).size()); j++)
          sm += cnt[bg[j]] * ps[j][p1];
      } else {
        sm = ans[p1];
        for (int j = 0; j < (int)((int)(bg).size()); j++)
          sm += cnt[bg[j]] * ps[j][p1];
      }
      printf("%I64d\n", sm);
    } else {
      scanf("%d %I64d ", &p1, &p2);
      if (((int)(p[p1]).size()) < M) {
        for (int j = 0; j < (int)((int)(p[p1]).size()); j++) a[p[p1][j]] += p2;
        for (int j = 0; j < (int)((int)(bg).size()); j++)
          ans[bg[j]] += ps[j][p1] * p2;
      } else
        cnt[p1] += p2;
    }
  }
}
