#include <bits/stdc++.h>
using namespace std;
const int N = 100228, block = 316;
bool is_heavy[N];
vector<int> heavy, light, s[N];
vector<long long> mn[N];
long long delt[N], ans[N], a[N];
int id[N], sz[N], us[N];
long long query(int num) {
  if (is_heavy[num]) {
    long long temp = 0;
    for (int i = 0; i < heavy.size(); i++) {
      temp += mn[num][i] * delt[i];
    }
    return ans[id[num]] + temp;
  } else {
    long long temp = 0;
    for (int i = 0; i < sz[num]; i++) {
      temp += a[s[num][i]];
    }
    for (int i = 0; i < heavy.size(); i++) {
      temp += mn[num][i] * delt[i];
    }
    return temp;
  }
}
void add(int num, long long x) {
  if (is_heavy[num]) {
    delt[id[num]] += x;
  } else {
    for (int i = 0; i < sz[num]; i++) {
      a[s[num][i]] += x;
    }
    for (int i = 0; i < heavy.size(); i++) {
      ans[i] += x * mn[num][i];
    }
  }
}
int main() {
  ios::sync_with_stdio(false);
  int n, m, q;
  cin >> n >> m >> q;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (int i = 0; i < m; i++) {
    cin >> sz[i];
    s[i].resize(sz[i]);
    for (int j = 0; j < sz[i]; j++) {
      cin >> s[i][j];
      s[i][j]--;
    }
    if (sz[i] >= block) {
      heavy.push_back(i);
      is_heavy[i] = 1;
      id[i] = heavy.size() - 1;
    } else {
      light.push_back(i);
      id[i] = light.size() - 1;
    }
  }
  for (int p = 0; p < heavy.size(); p++) {
    for (int i = 0; i < sz[heavy[p]]; i++) {
      us[s[heavy[p]][i]] = 1;
      ans[p] += a[s[heavy[p]][i]];
    }
    for (int h = 0; h < m; h++) {
      int kol = 0;
      for (int i = 0; i < sz[h]; i++) {
        kol += us[s[h][i]];
      }
      mn[h].push_back(kol);
    }
    for (int i = 0; i < sz[heavy[p]]; i++) {
      us[s[heavy[p]][i]] = 0;
    }
  }
  while (q--) {
    string str;
    cin >> str;
    if (str == "?") {
      int i;
      cin >> i;
      i--;
      cout << query(i) << "\n";
    } else {
      int i;
      long long x;
      cin >> i >> x;
      i--;
      add(i, x);
    }
  }
}
