#include <bits/stdc++.h>
using namespace std;
const int N = 100000 + 10;
const int SZ = 315;
vector<int> g[N];
int id[N], id_sz;
int n, m, q;
long long a[N];
int ins[N][N / SZ + 10];
bool inset[N / SZ + 10][N];
long long sum[N / SZ + 10], tar[N / SZ + 10];
void solve() {
  long long an;
  while (q--) {
    char s[5];
    int v, x;
    scanf("%s", s);
    if (s[0] == '?') {
      scanf("%d", &v);
      v--;
      if (id[v] == -1) {
        an = 0;
        for (int i = 0; i < g[v].size(); i++) {
          an += a[g[v][i]];
        }
        for (int i = 0; i < id_sz; i++) {
          an += (long long)tar[i] * ins[v][i];
        }
        cout << an << endl;
      } else {
        an = sum[id[v]];
        for (int i = 0; i < id_sz; i++) {
          an += (long long)tar[i] * ins[v][i];
        }
        cout << an << endl;
      }
    } else {
      scanf("%d%d", &v, &x);
      v--;
      if (id[v] == -1) {
        for (int i = 0; i < g[v].size(); i++) {
          a[g[v][i]] += x;
        }
        for (int i = 0; i < id_sz; i++) {
          sum[i] += ins[v][i] * x;
        }
      } else {
        tar[id[v]] += x;
      }
    }
  }
}
int main() {
  while (~scanf("%d%d%d", &n, &m, &q)) {
    for (int i = 0; i < n; i++) scanf("%I64d", a + i);
    memset(id, -1, sizeof(id));
    id_sz = 0;
    for (int i = 0; i < m; i++) g[i].clear();
    for (int i = 0; i < m; i++) {
      int cnt;
      scanf("%d", &cnt);
      long long tmp = 0;
      while (cnt--) {
        int x;
        scanf("%d", &x);
        x--;
        g[i].push_back(x);
        tmp += a[x];
      }
      if (g[i].size() > SZ) {
        for (int j = 0; j < g[i].size(); j++) inset[id_sz][g[i][j]] = 1;
        sum[id_sz] = tmp;
        id[i] = id_sz++;
      }
    }
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < g[i].size(); j++) {
        for (int k = 0; k < id_sz; k++) {
          ins[i][k] += inset[k][g[i][j]];
        }
      }
    }
    solve();
  }
  return 0;
}
