#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9 + 10;
const long long int INFLL = 1e18 + 10;
const long double EPS = 1e-8;
const long double EPSLD = 1e-14;
const long long int MOD = 1e9 + 7;
template <class T>
T &chmin(T &a, const T &b) {
  return a = min(a, b);
}
template <class T>
T &chmax(T &a, const T &b) {
  return a = max(a, b);
}
const int MAX_N = 100010;
const int B = 765;
int n, m, q;
bool is_heavy[MAX_N];
long long int ans[MAX_N];
long long int added[MAX_N];
vector<long long int> intersect[MAX_N];
long long int a[MAX_N];
vector<int> s[MAX_N];
vector<int> heavys;
bool used[MAX_N];
int main() {
  scanf("%d %d %d", &n, &m, &q);
  for (int i = (0); i < (int)(n); i++) scanf("%lld", &a[i]);
  for (int i = (0); i < (int)(m); i++) {
    int size = 0;
    scanf("%d", &size);
    for (int j = (0); j < (int)(size); j++) {
      int x;
      scanf("%d", &x);
      x--;
      s[i].emplace_back(x);
    }
    if (s[i].size() >= B) {
      is_heavy[i] = true;
      heavys.emplace_back(i);
    }
  }
  for (auto &i : heavys) {
    intersect[i].resize(m);
    for (int j = (0); j < (int)(n); j++) used[j] = false;
    for (auto &w : s[i]) used[w] = true;
    for (int j = (0); j < (int)(m); j++)
      for (auto &w : s[j])
        if (used[w]) intersect[i][j]++;
    for (auto &w : s[i]) ans[i] += a[w];
  }
  scanf("\n");
  for (int query_cnt = (0); query_cnt < (int)(q); query_cnt++) {
    char t;
    int x;
    long long int y;
    scanf("%c", &t);
    if (t == '?') {
      scanf("%d\n", &x);
      x--;
      long long int p = 0;
      for (auto &w : heavys) p += added[w] * intersect[w][x];
      if (is_heavy[x]) {
        printf("%lld\n", ans[x] + p);
      } else {
        long long int res = 0;
        for (auto &w : s[x]) res += a[w];
        printf("%lld\n", res + p);
      }
    } else if (t == '+') {
      scanf("%d %lld\n", &x, &y);
      x--;
      if (is_heavy[x]) {
        added[x] += y;
      } else {
        for (auto &w : s[x]) a[w] += y;
        for (auto &w : heavys) ans[w] += y * intersect[w][x];
      }
    }
  }
  return 0;
}
