#include <bits/stdc++.h>
using namespace std;
const char InFile[] = "202Div1C.in";
const char OutFile[] = "202Div1C.out";
const int MaxN = 100111;
const int MaxM = MaxN;
const int MaxSqrtM = 320;
struct HeavySet {
  long long global, local;
};
int N, M, Q;
int intersection[MaxM][MaxSqrtM];
long long A[MaxN];
vector<int> S[MaxM];
int heavyCnt, heavyIndex[MaxM];
HeavySet heavy[MaxSqrtM];
inline int BinarySearch(int x, int val) {
  int first = 0;
  int step = 1 << 17;
  for (; step; step >>= 1) {
    unsigned int index = first + step;
    if (index < S[x].size()) {
      if (S[x][index] <= val) {
        first = index;
      }
    }
  }
  if (val == S[x][first]) {
    return 1;
  }
  return 0;
}
int main() {
  cin >> N >> M >> Q;
  for (register int i = 1; i <= N; ++i) {
    cin >> A[i];
  }
  for (register int i = 1; i <= M; ++i) {
    int X, Y;
    cin >> X;
    for (register int j = 1; j <= X; ++j) {
      cin >> Y;
      S[i].push_back(Y);
    }
    sort(S[i].begin(), S[i].end());
  }
  unsigned int sqrtN = 1;
  while (sqrtN * sqrtN <= (unsigned int)N) {
    ++sqrtN;
  }
  for (register int i = 1; i <= M; ++i) {
    if (S[i].size() > sqrtN) {
      ++heavyCnt;
      heavyIndex[i] = heavyCnt;
      for (vector<int>::iterator it = S[i].begin(); it != S[i].end(); ++it) {
        heavy[heavyCnt].local += A[*it];
      }
      for (register int j = 1; j <= M; ++j) {
        for (vector<int>::iterator it = S[j].begin(); it != S[j].end(); ++it) {
          intersection[j][heavyCnt] += BinarySearch(i, *it);
        }
      }
    }
  }
  for (; Q; --Q) {
    int K;
    long long X;
    char op;
    cin >> op;
    if (op == '+') {
      cin >> K >> X;
      if (heavyIndex[K]) {
        heavy[heavyIndex[K]].global += X;
      } else {
        for (vector<int>::iterator it = S[K].begin(); it != S[K].end(); ++it) {
          A[*it] += X;
        }
        for (register int i = 1; i <= heavyCnt; ++i) {
          heavy[i].local += X * intersection[K][i];
        }
      }
    } else {
      cin >> K;
      long long sol = 0;
      if (heavyIndex[K]) {
        ;
        sol = heavy[heavyIndex[K]].local;
        for (register int i = 1; i <= heavyCnt; ++i) {
          ;
          ;
          sol += heavy[i].global * intersection[K][i];
        }
      } else {
        for (vector<int>::iterator it = S[K].begin(); it != S[K].end(); ++it) {
          sol += A[*it];
        }
        for (register int i = 1; i <= heavyCnt; ++i) {
          sol += heavy[i].global * intersection[K][i];
        }
      }
      cout << sol << "\n";
    }
  }
  return 0;
}
