#include <bits/stdc++.h>
using namespace std;
const int B = 300, N = 1e5 + 5;
vector<int> nset[N], cover[N];
vector<pair<int, int> > updbig[N];
int n, m, q, cnt[N];
long long sumbig[N], incbig[N], a[N];
int main() {
  scanf("%d%d%d", &n, &m, &q);
  for (int i = (1); i <= (n); ++i) scanf("%lld", &a[i]);
  for (int i = (1); i <= (m); ++i) {
    int cnt;
    scanf("%d", &cnt);
    for (int j = (1); j <= (cnt); ++j) {
      int x;
      scanf("%d", &x);
      nset[i].push_back(x);
      cover[x].push_back(i);
    }
  }
  for (int i = (1); i <= (m); ++i)
    if (nset[i].size() > B) {
      for (__typeof((nset[i]).begin()) j = (nset[i]).begin();
           j != (nset[i]).end(); ++j)
        sumbig[i] += a[*j];
      for (int j = (1); j <= (n); ++j) cnt[j] = 0;
      for (__typeof((nset[i]).begin()) j = (nset[i]).begin();
           j != (nset[i]).end(); ++j)
        for (__typeof((cover[*j]).begin()) k = (cover[*j]).begin();
             k != (cover[*j]).end(); ++k)
          ++cnt[*k];
      for (int j = (1); j <= (n); ++j)
        if (cnt[j]) updbig[j].push_back(pair<int, int>(i, cnt[j]));
    }
  for (int zz = 0; zz < (q); ++zz) {
    char buf[5];
    scanf("%s", buf);
    if (buf[0] == '?') {
      long long ans = 0;
      int u;
      scanf("%d", &u);
      if (nset[u].size() > B) {
        ans += sumbig[u];
      } else {
        for (__typeof((updbig[u]).begin()) i = (updbig[u]).begin();
             i != (updbig[u]).end(); ++i)
          ans += incbig[i->first] * i->second;
        for (__typeof((nset[u]).begin()) i = (nset[u]).begin();
             i != (nset[u]).end(); ++i)
          ans += a[*i];
      }
      cout << ans << endl;
    } else {
      int u, v;
      scanf("%d%d", &u, &v);
      if (nset[u].size() > B) {
        for (__typeof((updbig[u]).begin()) i = (updbig[u]).begin();
             i != (updbig[u]).end(); ++i)
          sumbig[i->first] += 1LL * v * i->second;
        incbig[u] += v;
      } else {
        for (__typeof((nset[u]).begin()) i = (nset[u]).begin();
             i != (nset[u]).end(); ++i)
          a[*i] += v;
        for (__typeof((updbig[u]).begin()) i = (updbig[u]).begin();
             i != (updbig[u]).end(); ++i)
          sumbig[i->first] += 1LL * i->second * v;
      }
    }
  }
  return 0;
}
