#include <bits/stdc++.h>
using namespace std;
const int N = 100000 + 5;
int n, m, Q, L, T;
long long x, a[N];
long long res[N];
long long av[N];
int go[N];
char ch;
vector<int> v[N];
vector<int> q[N];
vector<int> c[N];
int main() {
  L = 320;
  int q1, q2, qa;
  scanf("%d%d%d", &n, &m, &Q);
  for (int i = 1; i <= n; ++i) scanf("%I64d", &a[i]);
  q1 = 1;
  q2 = m;
  for (int i = 1; i <= m; ++i) {
    scanf("%d", &qa);
    if (qa > L) {
      go[i] = q2;
      v[q2].resize(qa);
      for (int j = 0; j < qa; ++j) {
        scanf("%d", &v[q2][j]);
        res[q2] += a[v[q2][j]];
      }
      --q2;
    } else {
      go[i] = q1;
      v[q1].resize(qa);
      for (int j = 0; j < qa; ++j) scanf("%d", &v[q1][j]);
      ++q1;
    }
  }
  for (int i = 1; i <= m; ++i) {
    q[i].resize(m - q2);
    for (int j = 0; j < m - q2; ++j) q[i][j] = 0;
  }
  for (int i = 1; i <= m; ++i) {
    for (int j = 0; j < (int)v[i].size(); ++j) {
      c[v[i][j]].push_back(i);
    }
  }
  for (int i = q2 + 1; i <= m; ++i) {
    for (int j = 0; j < (int)v[i].size(); ++j) {
      int in = v[i][j];
      for (int k = 0; k < (int)c[in].size(); ++k) {
        q[c[in][k]][i - (q2 + 1)]++;
      }
    }
  }
  int in;
  for (int te = 1; te <= Q; ++te) {
    cin >> ch;
    scanf("%d", &in);
    in = go[in];
    if (ch == '?') {
      long long su = 0;
      if ((int)v[in].size() <= L) {
        for (int i = 0; i < (int)v[in].size(); ++i) su += a[v[in][i]];
      } else {
        su = res[in];
      }
      for (int i = q2 + 1; i <= m; ++i) {
        su = su + av[i] * q[in][i - (q2 + 1)];
      }
      printf("%I64d\n", su);
    } else {
      scanf("%I64d", &x);
      if ((int)v[in].size() <= L) {
        for (int i = 0; i < (int)v[in].size(); ++i) a[v[in][i]] += x;
        for (int i = 0; i < (int)q[in].size(); ++i)
          res[i + q2 + 1] += x * q[in][i];
      } else {
        av[in] += x;
      }
    }
  }
  return 0;
}
