#include <bits/stdc++.h>
using namespace std;
template <class T>
struct rge {
  T b, e;
};
template <class T>
rge<T> range(T i, T j) {
  return rge<T>{i, j};
}
template <class T>
auto dud(T *x) -> decltype(cerr << *x, 0);
template <class T>
char dud(...);
struct debug {
  template <class T>
  debug &operator<<(const T &) {
    return *this;
  }
};
const int N = 1e5 + 5;
const int SQ = 321;
vector<int> st[N];
vector<int> who[N];
vector<int> big;
int mp[N];
long long cnt[SQ][N], lazy[N];
long long a[N];
long long sum[N];
int n, m, q;
long long querySmall(int k) {
  long long sum = 0;
  for (int i : st[k]) sum += a[i];
  for (int i : big) sum += cnt[mp[i]][k] * lazy[mp[i]];
  return sum;
}
long long queryBig(int k) { return sum[k]; }
void updateSmall(int k, long long x) {
  for (int i : st[k]) a[i] += x;
  for (int i : big) sum[i] += cnt[mp[i]][k] * x;
}
void updateBig(int k, long long x) {
  lazy[mp[k]] += x;
  for (int i : big) sum[i] += cnt[mp[i]][k] * x;
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n >> m >> q;
  for (auto i = (1) - ((1) > (n + 1)); i != n + 1 - ((1) > (n + 1));
       i += 1 - 2 * ((1) > (n + 1)))
    cin >> a[i];
  for (auto k = (1) - ((1) > (m + 1)); k != m + 1 - ((1) > (m + 1));
       k += 1 - 2 * ((1) > (m + 1))) {
    int len;
    cin >> len;
    st[k].resize(len);
    for (int &i : st[k]) {
      cin >> i;
      sum[k] += a[i];
      who[i].push_back(k);
    }
    mp[k] = -1;
    if ((int)st[k].size() > SQ) {
      mp[k] = (int)big.size();
      big.push_back(k);
    }
  }
  for (int k : big) {
    for (int i : st[k])
      for (int j : who[i]) cnt[mp[k]][j]++;
  }
  char op;
  int k, x;
  while (q--) {
    cin >> op;
    if (op == '?') {
      cin >> k;
      cout << (mp[k] == -1 ? querySmall(k) : queryBig(k)) << '\n';
    } else {
      cin >> k >> x;
      mp[k] == -1 ? updateSmall(k, x) : updateBig(k, x);
    }
  }
  return 0;
}
