#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-8;
inline int sign(double x) { return (x > eps) - (x < -eps); }
const int maxn = 5e5 + 10, mod = 1e9 + 7, INF = 0x3f3f3f3f;
int a[maxn];
int mx[maxn << 2], pos[maxn << 2];
void upd(int p, int c, int l, int r, int rt) {
  if (l == r) {
    mx[rt] = c;
    pos[rt] = p;
    return;
  }
  int m = l + r >> 1;
  if (p <= m)
    upd(p, c, l, m, rt << 1);
  else
    upd(p, c, m + 1, r, rt << 1 | 1);
  mx[rt] = max(mx[rt << 1], mx[rt << 1 | 1]);
  pos[rt] = mx[rt << 1] > mx[rt << 1 | 1] ? pos[rt << 1] : pos[rt << 1 | 1];
}
pair<int, int> qry(int L, int R, int l, int r, int rt) {
  if (L <= l && r <= R) return make_pair(mx[rt], pos[rt]);
  int m = l + r >> 1;
  pair<int, int> res = make_pair(-1, -1);
  if (L <= m) res = max(res, qry(L, R, l, m, rt << 1));
  if (R > m) res = max(res, qry(L, R, m + 1, r, rt << 1 | 1));
  return res;
}
int fa[maxn], rt;
int find(int x) { return fa[x] == x ? x : fa[x] = find(fa[x]); }
vector<int> e[maxn];
int dfn[maxn], sz[maxn], tim;
void dfs(int u) {
  dfn[u] = ++tim;
  sz[u] = 1;
  upd(tim, a[u], 1, rt, 1);
  for (auto v : e[u]) {
    dfs(v);
    sz[u] += sz[v];
  }
}
int op[maxn], b[maxn], del[maxn], bl[maxn];
pair<int, int> p[maxn];
int main() {
  int n, m, q;
  cin >> n >> m >> q;
  for (int i = 1; i <= n; ++i) scanf("%d", &a[i]);
  for (int i = 1; i <= m; ++i) scanf("%d%d", &p[i].first, &p[i].second);
  for (int i = 1; i <= q; ++i) {
    scanf("%d%d", &op[i], &b[i]);
    if (op[i] == 2) del[b[i]] = 1;
  }
  for (int i = 1; i <= 2 * n; ++i) fa[i] = i;
  rt = n;
  for (int i = 1; i <= m; ++i) {
    if (del[i]) continue;
    int x = p[i].first, y = p[i].second;
    int fx = find(x), fy = find(y);
    if (fx != fy) {
      fa[fx] = fa[fy] = ++rt;
      e[rt].push_back(fx);
      e[rt].push_back(fy);
    }
  }
  for (int i = q; i; --i) {
    if (op[i] == 1)
      bl[i] = find(b[i]);
    else {
      int x = p[b[i]].first, y = p[b[i]].second;
      int fx = find(x), fy = find(y);
      if (fx != fy) {
        fa[fx] = fa[fy] = ++rt;
        e[rt].push_back(fx);
        e[rt].push_back(fy);
      }
    }
  }
  for (int i = rt; i; --i)
    if (!sz[i]) dfs(i);
  for (int i = 1; i <= q; ++i) {
    if (op[i] == 2) continue;
    int u = bl[i];
    pair<int, int> res = qry(dfn[u], dfn[u] + sz[u] - 1, 1, rt, 1);
    upd(res.second, 0, 1, rt, 1);
    printf("%d\n", res.first);
  }
  return 0;
}
