#include <bits/stdc++.h>
using namespace std;
const long long sz = 2e5 + 10, esz = 3e5 + 10, qsz = 5e5 + 10;
int p[sz], erased[esz], par[sz], siz[sz];
struct info {
  long long a, b;
} edge[esz], qry[qsz];
struct rollback {
  int par, node, siz;
} chng[qsz];
long long findp(long long u) {
  if (par[u] == u) return u;
  return findp(par[u]);
}
vector<int> lst[sz];
const bool cmp(int &a, int &b) { return p[a] < p[b]; }
void dsu_uni(int u, int v, int id = 0) {
  int pu = findp(u), pv = findp(v);
  if (pu == pv) return;
  if (siz[pu] < siz[pv]) swap(pu, pv);
  if (id != 0) chng[id] = {pu, pv, siz[pu]};
  par[pv] = pu;
  lst[pu].insert(lst[pu].end(), lst[pv].begin(), lst[pv].end());
  siz[pu] += siz[pv];
}
int main() {
  long long n, m, q;
  cin >> n >> m >> q;
  for (long long i = 1; i <= n; ++i) scanf("%d", &p[i]);
  for (long long i = 1; i <= m; ++i)
    scanf("%lld", &edge[i].a), scanf("%lld", &edge[i].b);
  for (long long i = 1; i <= q; ++i) {
    scanf("%lld", &qry[i].a), scanf("%lld", &qry[i].b);
    if (qry[i].a == 2) erased[qry[i].b] = 1;
  }
  for (long long i = 1; i <= n; ++i)
    par[i] = i, siz[i] = 1, lst[i].push_back(i);
  for (long long i = 1; i <= m; ++i) {
    if (erased[i]) continue;
    dsu_uni(edge[i].a, edge[i].b);
  }
  for (long long i = q; i >= 1; --i) {
    if (qry[i].a == 1) continue;
    long long id = qry[i].b;
    dsu_uni(edge[id].a, edge[id].b, i);
  }
  for (long long i = 1; i <= n; ++i) sort(lst[i].begin(), lst[i].end(), cmp);
  for (long long i = 1; i <= q; ++i) {
    if (qry[i].a == 1) {
      long long pu = findp(qry[i].b);
      while (!lst[pu].empty()) {
        long long now = lst[pu].back(), pnow = findp(now);
        if (pnow != pu || p[now] == 0) {
          lst[pu].pop_back();
          continue;
        }
        break;
      }
      long long ans = 0;
      if (!lst[pu].empty()) ans = p[lst[pu].back()], p[lst[pu].back()] = 0;
      printf("%lld\n", ans);
    } else {
      par[chng[i].node] = chng[i].node;
      siz[chng[i].par] = chng[i].siz;
    }
  }
  return 0;
}
