#include <bits/stdc++.h>
#pragma warning(disable : 4996)
#pragma comment(linker, "/STACK:666000000")
using namespace std;
const int inf = (1 << 30) - 1;
const long double eps = 1e-9;
const long double pi = fabs(atan2(0.0, -1.0));
void ML(const bool v) {
  if (v) return;
  int *ass;
  for (;;) {
    ass = new int[2500000];
    for (int i = 0; i < 2500000; i++) ass[i] = rand();
  }
}
void TL(const bool v) {
  if (v) return;
  int *ass;
  ass = new int[250];
  for (;;) {
    for (int i = 0; i < 250; i++) ass[i] = rand();
  }
}
void PE(const bool v) {
  if (v) return;
  puts("ass 1 2 3 4 5 6 fuck");
  exit(0);
}
const int SZ = 100500;
const int CH = 666;
const int SQRT = 316;
struct node {
  bool light;
  int *intr;
  long long add;
  long long sum;
  node(const bool light) : light(light) {
    if (!light) {
      intr = new int[SZ];
      memset(intr, 0, SZ * sizeof(int));
    } else
      intr = NULL;
    add = 0;
    sum = 0;
  }
  node(){};
};
int hvs[100500];
int hn;
int n, m, qq;
long long a[100500];
vector<vector<int> > b;
node nd[100500];
bool was[CH][100500];
void add(const int id, const long long x) {
  if (nd[id].light) {
    for (int i = 0; i < (int)b[id].size(); i++) a[b[id][i]] += x;
    for (int ii = 0; ii < hn; ii++) {
      int i = hvs[ii];
      nd[i].sum += x * nd[i].intr[id];
    }
  } else
    nd[id].add += x;
}
long long calc(const int id) {
  if (nd[id].light) {
    long long res = 0;
    for (int i = 0; i < (int)b[id].size(); i++) res += a[b[id][i]];
    for (int ii = 0; ii < hn; ii++) {
      int i = hvs[ii];
      res += nd[i].add * nd[i].intr[id];
    }
    return res;
  } else {
    long long res = nd[id].sum;
    for (int ii = 0; ii < hn; ii++) {
      int i = hvs[ii];
      res += nd[i].add * nd[i].intr[id];
    }
    return res;
  }
}
void LoAd() {
  cin >> n >> m >> qq;
  for (int i = 1; i <= n; i++) scanf("%I64d", &a[i]);
  b.resize(m + 1);
  for (int x, i = 1; i <= m; i++) {
    scanf("%d", &x);
    b[i].resize(x);
    for (int j = 0; j < x; j++) scanf("%d", &b[i][j]);
    nd[i] = node(x < SQRT);
    if (!nd[i].light) hvs[hn++] = i;
    ML(hn < CH);
  }
  for (int ii = 0; ii < hn; ii++) {
    int i = hvs[ii];
    for (int j = 0; j < (int)b[i].size(); j++) was[ii][b[i][j]] = true;
  }
  for (int i = 1; i <= m; i++) {
    for (int j = 0; j < (int)b[i].size(); j++) {
      for (int k = 0; k < hn; k++)
        if (was[k][b[i][j]]) nd[hvs[k]].intr[i]++;
    }
  }
  for (int i = 1; i <= m; i++)
    for (int j = 0; j < (int)b[i].size(); j++) nd[i].sum += a[b[i][j]];
  scanf("\n");
  for (int id, x, i = 0; i < qq; i++) {
    char ord;
    scanf("%c", &ord);
    if ('+' == ord) {
      scanf("%d%d\n", &id, &x);
      add(id, x);
    } else {
      scanf("%d\n", &id);
      printf("%I64d\n", calc(id));
    }
  }
}
void SoLvE() {}
int main() {
  srand((int)time(NULL));
  LoAd();
  SoLvE();
  return 0;
}
