#include <bits/stdc++.h>
template <typename T>
inline void read(T &x) {
  char c;
  bool b = 0;
  while (!isdigit(c = getchar()) && c != '-')
    ;
  if (c == '-') c = getchar(), b = 1;
  x = c - 48;
  while (isdigit(c = getchar())) x = (x << 3) + (x << 1) + c - 48;
  if (b) x = -x;
}
using namespace std;
const int N = 1e5 + 11;
const int lim = 320;
int n, m, q, cnt, id[N], nhan[N], ok[N], f[N][323];
long long a[N], ans[N], lazy[N];
vector<int> ds[N];
int main() {
  ios_base::sync_with_stdio(0);
  cout.tie(0);
  if (fopen("m"
            ".inp",
            "r")) {
    freopen(
        "m"
        ".inp",
        "r", stdin);
    freopen(
        "m"
        ".out",
        "w", stdout);
  }
  read(n);
  read(m);
  read(q);
  for (int i = 1; i <= n; i++) read(a[i]);
  for (int i = 1; i <= m; i++) {
    int x;
    read(x);
    while (x--) {
      int y;
      read(y);
      ds[i].push_back(y);
      ans[i] += a[y];
    }
    if (ds[i].size() >= lim)
      id[++cnt] = i;
    else
      ans[i] = 0;
  }
  for (int i = 1; i <= cnt; i++) {
    int u = id[i];
    nhan[u] = i;
    for (int j = 0; j < ds[u].size(); j++) ok[ds[u][j]] = 1;
    for (int v = 1; v <= m; v++) {
      int dem = 0;
      for (int j = 0; j < ds[v].size(); j++)
        if (ok[ds[v][j]]) dem++;
      f[v][i] = dem;
    }
    for (int j = 0; j < ds[u].size(); j++) ok[ds[u][j]] = 0;
  }
  while (q--) {
    char type;
    do type = getchar();
    while (type != '?' && type != '+');
    if (type == '?') {
      int x;
      read(x);
      long long res = ans[x];
      if (ds[x].size() < lim) {
        for (int i = 0; i < ds[x].size(); i++) res += a[ds[x][i]];
        for (int i = 1; i <= cnt; i++) res += lazy[i] * f[x][i];
      }
      cout << res << '\n';
    } else {
      int x;
      long long val;
      read(x);
      read(val);
      if (ds[x].size() < lim)
        for (int i = 0; i < ds[x].size(); i++) a[ds[x][i]] += val;
      else
        lazy[nhan[x]] += val;
      for (int i = 1; i <= cnt; i++) ans[id[i]] += val * f[x][i];
    }
  }
}
