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;
int A[1000006];
int fa[1000006], tot = 0;
int find(int x) { return x == fa[x] ? x : fa[x] = find(fa[x]); }
struct ed {
  int u, v, w;
} E[1000006];
vector<pair<int, int> > qs;
vector<int> G[1000006];
int que[1000006];
int L[1000006], R[1000006], bac[1000006], clo;
void dfs(int u) {
  L[u] = ++clo, bac[clo] = u;
  for (int v : G[u]) dfs(v);
  R[u] = clo;
}
pair<int, int> T[1000006 << 2];
void pu(int rt) { T[rt] = max(T[rt << 1], T[rt << 1 | 1]); }
void build(int rt, int l, int r) {
  if (l == r) {
    T[rt] = make_pair(A[bac[l]], l);
    return;
  }
  int m = l + r >> 1;
  build(rt << 1, l, m), build(rt << 1 | 1, m + 1, r);
  pu(rt);
}
pair<int, int> query(int rt, int l, int r, int L, int R) {
  if (L <= l && R >= r) return T[rt];
  int m = l + r >> 1;
  pair<int, int> res;
  if (L <= m) res = max(res, query(rt << 1, l, m, L, R));
  if (R > m) res = max(res, query(rt << 1 | 1, m + 1, r, L, R));
  return res;
}
void mdfy(int rt, int l, int r, int p) {
  if (l == r) {
    T[rt] = {0, l};
    return;
  }
  int m = l + r >> 1;
  if (p <= m)
    mdfy(rt << 1, l, m, p);
  else
    mdfy(rt << 1 | 1, m + 1, r, p);
  pu(rt);
}
void solve() {
  cin >> n >> m >> q;
  for (int i = (1), iend = (n); i <= iend; ++i) scanf("%d", A + i);
  for (int i = (1), iend = (n << 1); i <= iend; ++i) fa[i] = i;
  for (int i = (1), iend = (m); i <= iend; ++i) {
    static int u, v;
    scanf("%d%d", &u, &v);
    E[i] = (ed){u, v, 0x3f3f3f3f};
  }
  for (int i = (1), iend = (q); i <= iend; ++i) {
    static int op, x;
    scanf("%d%d", &op, &x);
    if (op == 1) {
      qs.emplace_back(make_pair(x, i));
    } else {
      E[x].w = i;
    }
  }
  sort(E + 1, E + 1 + m, [](ed a, ed b) { return a.w > b.w; });
  sort((qs).begin(), (qs).end(),
       [](pair<int, int> a, pair<int, int> b) { return a.second > b.second; });
  int u, v, cur = 0;
  tot = n;
  for (int i = (1), iend = (m); i <= iend; ++i) {
    u = find(E[i].u), v = find(E[i].v);
    while (qs[cur].second > E[i].w && cur < qs.size()) {
      que[qs[cur].second] = find(qs[cur].first);
      ++cur;
    }
    if (u != v) {
      fa[u] = fa[v] = ++tot;
      G[tot].push_back(u), G[tot].push_back(v);
    }
  }
  while (cur < qs.size()) que[qs[cur].second] = find(qs[cur].first), ++cur;
  for (int i = (1), iend = (tot); i <= iend; ++i)
    if (fa[i] == i) dfs(i);
  build(1, 1, tot);
  for (int i = (1), iend = (q); i <= iend; ++i)
    if (que[i]) {
      pair<int, int> as = query(1, 1, tot, L[que[i]], R[que[i]]);
      printf("%d\n", as.first);
      mdfy(1, 1, tot, as.second);
    }
}
signed main() { solve(); }
