#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:167772160000")
using namespace std;
void redirectIO() {
  ios::sync_with_stdio(false);
  cin.tie(0);
}
bool large(int x) { return x > 500; }
vector<int> sets[110000];
vector<int> largeSets;
int largeNum[110000];
int intersections[400][101000];
int getInters(const vector<int> &a, const vector<int> &b) {
  int res = 0;
  int i = 0, j = 0;
  while (i < a.size() && j < b.size()) {
    if (a[i] < b[j])
      i++;
    else if (a[i] > b[j])
      j++;
    else {
      res++;
      i++;
      j++;
    }
  }
  return res;
}
long long initialElements[110000];
long long initialValues[110000];
long long largeValue[110000];
long long addedToLarge[400];
long long addedToEl[110000];
void upd(int a, long long amount) {
  for (int i = 0; i < (largeSets.size()); i++) {
    largeValue[i] += amount * intersections[i][a];
  }
  if (large(sets[a].size())) {
    addedToLarge[largeNum[a]] += amount;
  } else {
    for (int x : sets[a]) addedToEl[x] += amount;
  }
}
long long query(int a) {
  if (large(sets[a].size())) {
    return largeValue[largeNum[a]];
  }
  long long res = initialValues[a];
  for (int x : sets[a]) res += addedToEl[x];
  for (int i = 0; i < (largeSets.size()); i++) {
    res += addedToLarge[i] * intersections[i][a];
  }
  return res;
}
int main() {
  redirectIO();
  int n, m, q;
  cin >> n >> m >> q;
  for (int i = 1; i <= (n); i++) cin >> initialElements[i];
  for (int i = 1; i <= (m); i++) {
    int k;
    cin >> k;
    for (int j = 0; j < (k); j++) {
      int a;
      cin >> a;
      sets[i].push_back(a);
      initialValues[i] += initialElements[a];
    }
    if (large(k)) {
      largeNum[i] = largeSets.size();
      largeValue[largeNum[i]] = initialValues[i];
      largeSets.push_back(i);
    }
    sort(sets[i].begin(), sets[i].end());
  }
  for (int i = 0; i < (largeSets.size()); i++) {
    for (int j = 1; j <= (m); j++) {
      intersections[i][j] = getInters(sets[largeSets[i]], sets[j]);
    }
  }
  for (int i = 0; i < (q); i++) {
    char c;
    cin >> c;
    if (c == '+') {
      long long a, b;
      cin >> a >> b;
      upd(a, b);
    } else {
      long long a;
      cin >> a;
      cout << query(a) << "\n";
    }
  }
  return 0;
}
