#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
const int maxr = 325;
long long num[maxn], ans[maxn], add[maxn];
int heavy[maxr], inter[maxn][maxr];
bool is_heavy[maxn], tem[maxn][maxr];
vector<int> S[maxn];
int main(void) {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n, m, q;
  cin >> n >> m >> q;
  for (int i = 1; i <= n; i++) cin >> num[i];
  int hh = 0;
  for (int i = 1; i <= m; i++) {
    int ss;
    cin >> ss;
    for (int j = 1; j <= ss; j++) {
      int x;
      cin >> x;
      ans[i] += num[x];
      S[i].push_back(x);
    }
    if (ss > sqrt(n)) {
      heavy[++hh] = i;
      is_heavy[i] = 1;
      for (auto ind : S[i]) tem[ind][hh] = 1;
    }
  }
  for (int i = 1; i <= m; i++)
    for (int j = 1; j <= hh; j++)
      for (auto ind : S[i])
        if (tem[ind][j]) inter[i][j]++;
  while (q--) {
    char op;
    cin >> op;
    if (op == '+') {
      int k, x;
      cin >> k >> x;
      if (!is_heavy[k]) {
        for (auto ind : S[k]) num[ind] += (long long)x;
        for (int i = 1; i <= hh; i++)
          ans[heavy[i]] += (long long)x * (long long)inter[k][i];
      } else
        add[k] += (long long)x;
    } else {
      int k;
      cin >> k;
      if (!is_heavy[k]) {
        long long aux = 0LL;
        for (auto ind : S[k]) aux += num[ind];
        for (int i = 1; i <= hh; i++)
          aux += add[heavy[i]] * (long long)inter[k][i];
        cout << aux << "\n";
      } else {
        long long aux = ans[k];
        for (int i = 1; i <= hh; i++)
          aux += add[heavy[i]] * (long long)inter[k][i];
        cout << aux << "\n";
      }
    }
  }
}
