9 5 14
7 1 4 8 5 2 6 9 3
2 8
1 6
5 7
1 3
3 9
1 5
1 8
1 5
1 4
1 8
1 3
1 5
1 5
1 7
1 7
2 3
1 2
1 1
1 2
 6 5 8
1 2 6 3 4 5
2 4
1 3
1 6
3 5
2 5
1 1
1 4
1 1
2 1
2 5
2 2
2 3
1 4
 2 1 3
1 2
1 2
1 1
1 1
1 1

6
9
5
8
1
7
0
0
0
0
0
4
0
 6
5
4
3
 2
1
0

#include <bits/stdc++.h>
using namespace std;
int n, m, q, r = 1, tmp, a[200005], w[200005], tim[300005], op[500005],
             x[500005], ans[500005], be[300005], ed[300005], fp[200005],
             t[200005 * 4];
int tot, head[200005];
int fo[200005], nxt[200005];
int finds(int x) { return w[x] == x ? x : w[x] = finds(w[x]); }
void link(int u, int to, int f = 0) {
  int fu = finds(u), fto = finds(to);
  if (fu == fto) return;
  if (!f && fp[fu] < fp[fto]) swap(fu, fto), swap(u, to);
  w[fto] = fu;
  fp[fu] = max(fp[fu], fp[fto] + 1);
  fo[++tot] = to;
  nxt[tot] = head[u];
  head[u] = tot;
}
void dfs(int u) {
  fp[be[u] = ++tmp] = u;
  for (int i = head[u]; i; i = nxt[i]) dfs(fo[i]);
  ed[u] = tmp;
}
int cma(int x, int y) { return a[x] > a[y] ? x : y; }
void build(int l, int r, int i) {
  t[i] = fp[l];
  if (l == r) return;
  build(l, (l + r) / 2, i * 2 + 1);
  build((l + r) / 2 + 1, r, i * 2 + 2);
  t[i] = cma(t[i * 2 + 1], t[i * 2 + 2]);
}
void upd(int pos, int l, int r, int i) {
  t[i] = fp[l];
  if (l == r) return;
  if (pos <= (l + r) / 2)
    upd(pos, l, (l + r) / 2, i * 2 + 1);
  else
    upd(pos, (l + r) / 2 + 1, r, i * 2 + 2);
  t[i] = cma(t[i * 2 + 1], t[i * 2 + 2]);
}
int quy(int L, int R, int l, int r, int i) {
  if (L <= l && R >= r) return t[i];
  int res = 0;
  if (L <= (l + r) / 2) res = cma(res, quy(L, R, l, (l + r) / 2, i * 2 + 1));
  if (R > (l + r) / 2) res = cma(res, quy(L, R, (l + r) / 2 + 1, r, i * 2 + 2));
  return res;
}
int main() {
  cin >> n >> m >> q;
  for (int i = (1); i <= (n); i++) scanf("%d", &a[i]), w[i] = i, fp[i] = 1;
  w[n + 1] = n + 1;
  for (int i = (1); i <= (m); i++) scanf("%d%d", &be[i], &ed[i]);
  for (int i = (1); i <= (q); i++) {
    scanf("%d%d", &op[i], &x[i]);
    if (op[i] == 2) tim[x[i]] = 1;
  }
  for (int i = (1); i <= (m); i++)
    if (!tim[i]) link(be[i], ed[i]);
  for (int i = (q); i >= (1); i--) {
    if (op[i] == 2) link(be[x[i]], ed[x[i]]);
    if (op[i] == 1) ans[i] = finds(x[i]);
  }
  for (int i = (1); i <= (n); i++) link(n + 1, finds(i), 1);
  dfs(n + 1);
  build(1, n + 1, 0);
  for (int i = (1); i <= (q); i++) {
    if (op[i] == 2) continue;
    ans[i] = quy(be[ans[i]], ed[ans[i]], 1, n + 1, 0);
    printf("%d\n", a[ans[i]]);
    a[ans[i]] = 0;
    upd(be[ans[i]], 1, n + 1, 0);
  }
}
