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 i, k, m, n, x, y, rk[500050], id[500050], ot[500050], vis[500050], now, q,
    P[500050], Now, fa[500050], del[500050];
pair<int, int> qus[500050], e[500050];
struct node {
  int l, r;
} O[500050];
pair<int, int> T[500050 << 2];
int find(int x) { return x == fa[x] ? x : fa[x] = find(fa[x]); }
void dfs(int x) {
  vis[x] = 1, rk[id[x] = ++now] = x;
  if (O[x].l) dfs(O[x].l);
  if (O[x].r) dfs(O[x].r);
  ot[x] = now;
}
inline void up(int k) { T[k] = max(T[k << 1], T[k << 1 | 1]); }
void build(int k, int l, int r) {
  if (l == r) {
    if (rk[l] <= n)
      T[k] = make_pair(P[rk[l]], l);
    else
      T[k] = make_pair(0, 0);
    return;
  }
  int m = l + r >> 1;
  build(k << 1, l, m), build(k << 1 | 1, m + 1, r), up(k);
}
pair<int, int> query(int k, int l, int r, int L, int R) {
  if (l >= L && r <= R) return T[k];
  int m = l + r >> 1;
  pair<int, int> res(0, 0);
  if (L <= m) res = max(res, query(k << 1, l, m, L, R));
  if (R > m) res = max(res, query(k << 1 | 1, m + 1, r, L, R));
  return res;
}
void change(int k, int l, int r, int v) {
  if (l == r) {
    T[k] = make_pair(0, 0);
    return;
  }
  int m = l + r >> 1;
  if (v <= m)
    change(k << 1, l, m, v);
  else
    change(k << 1 | 1, m + 1, r, v);
  up(k);
}
int main() {
  scanf("%d%d%d", &n, &m, &q), Now = n + 1;
  for (i = 1; i <= n; ++i) scanf("%d", &P[i]), fa[i] = i;
  for (i = 1; i <= m; ++i)
    scanf("%d%d", &x, &y), e[i] = make_pair(x, y), del[i] = 0;
  for (i = 1; i <= q; ++i) {
    scanf("%d%d", &x, &y), qus[i] = make_pair(x, y);
    if (x == 2) del[y] = 1;
  }
  for (i = 1; i <= m; ++i)
    if (!del[i]) {
      int p = find(e[i].first), q = find(e[i].second);
      if (p != q) {
        O[Now] = (node){p, q};
        fa[Now] = fa[p] = fa[q] = Now, ++Now;
      }
    }
  for (i = q; i >= 1; --i)
    if (qus[i].first == 2) {
      int p = find(e[qus[i].second].first), q = find(e[qus[i].second].second);
      if (p != q) {
        O[Now] = (node){p, q};
        fa[Now] = fa[p] = fa[q] = Now, ++Now;
      }
    } else
      qus[i].second = find(qus[i].second);
  for (--Now, i = 1; i <= Now; ++i)
    if (find(i) == i) dfs(i);
  build(1, 1, Now);
  for (i = 1; i <= q; ++i)
    if (qus[i].first == 1) {
      int p = qus[i].second;
      pair<int, int> o = query(1, 1, Now, id[p], ot[p]);
      if (o.first == 0)
        puts("0");
      else
        printf("%d\n", o.first), change(1, 1, Now, o.second);
    }
}
