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;
const int N = 1e6 + 10;
int n, m, q;
int p[N];
int wei[N], w[N];
int tim[N], seq[N];
struct edge {
  int l, r;
} e[N];
struct query {
  int l, r, id;
} qq[N];
int tot;
int find(int x) {
  if (x == p[x]) return x;
  return p[x] = find(p[x]);
}
int cmp(int a, int b) { return tim[a] > tim[b]; }
int ans[N];
vector<int> g[N];
int in[N], out[N], num, pre[N], f[N][21];
int tr[N << 2];
void dfs(int u) {
  in[u] = ++num;
  pre[num] = u;
  for (int j = 1; j <= 20; j++) f[u][j] = f[f[u][j - 1]][j - 1];
  for (auto &j : g[u]) {
    f[j][0] = u;
    dfs(j);
  }
  out[u] = num;
}
void pushup(int rt) {
  if (w[tr[rt << 1]] >= w[tr[rt << 1 | 1]]) {
    tr[rt] = tr[rt << 1];
  } else
    tr[rt] = tr[rt << 1 | 1];
}
int get(int x, int t) {
  for (int i = 20; i >= 0; i--)
    if (f[x][i] && wei[f[x][i]] >= t) x = f[x][i];
  return x;
}
void build(int rt, int l, int r) {
  if (l == r) {
    tr[rt] = pre[l];
    return;
  }
  int mid = l + r >> 1;
  build(rt << 1, l, mid);
  build(rt << 1 | 1, mid + 1, r);
  pushup(rt);
}
int query(int rt, int L, int R, int l, int r) {
  if (L <= l && R >= r) {
    return tr[rt];
  }
  int mid = l + r >> 1;
  int res = 0, res1 = 0, res2 = 0;
  if (L <= mid) res1 = query(rt << 1, L, R, l, mid);
  if (R > mid) res2 = query(rt << 1 | 1, L, R, mid + 1, r);
  if (w[res1] >= w[res2])
    res = res1;
  else
    res = res2;
  return res;
}
void update(int rt, int L, int C, int l, int r) {
  if (l == r) {
    w[pre[l]] = C;
    tr[rt] = pre[l];
    return;
  }
  int mid = l + r >> 1;
  if (L <= mid)
    update(rt << 1, L, C, l, mid);
  else
    update(rt << 1 | 1, L, C, mid + 1, r);
  pushup(rt);
}
int main() {
  scanf("%d%d%d", &n, &m, &q);
  for (int i = 1; i <= n; i++) scanf("%d", &w[i]), wei[i] = q + 1;
  for (int i = 1; i <= n + n + 10; i++) p[i] = i;
  for (int i = 1; i <= m; i++) {
    scanf("%d%d", &e[i].l, &e[i].r);
    tim[i] = q + 1;
    seq[i] = i;
  }
  for (int i = 1; i <= q; i++) {
    scanf("%d%d", &qq[i].l, &qq[i].r);
    qq[i].id = i;
    if (qq[i].l == 2) tim[qq[i].r] = i;
  }
  sort(seq + 1, seq + m + 1, cmp);
  tot = n;
  for (int i = 1; i <= m; i++) {
    int u = e[seq[i]].l, v = e[seq[i]].r, t = tim[seq[i]];
    int fx = find(u), fy = find(v);
    if (fx == fy) continue;
    wei[++tot] = t;
    g[tot].push_back(fx);
    g[tot].push_back(fy);
    p[fx] = tot, p[fy] = tot;
  }
  for (int i = tot; i >= 1; i--)
    if (!in[i]) dfs(i);
  build(1, 1, num);
  for (int i = 1; i <= q; i++) {
    if (qq[i].l == 1) {
      int v = get(qq[i].r, i);
      int tmp = query(1, in[v], out[v], 1, num);
      ans[i] = w[tmp];
      if (ans[i]) update(1, in[tmp], 0, 1, num);
      printf("%d\n", ans[i]);
    }
  }
}
