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 maxn = 6e5 + 50;
int n, m, q;
int w[maxn];
int a[maxn], b[maxn];
int op[maxn], c[maxn];
int vis[maxn];
int tot;
int pre[maxn], fa[maxn];
int fnd(int x) { return (x == fa[x]) ? x : (fa[x] = fnd(fa[x])); }
int link(int x, int y) {
  x = fnd(x);
  y = fnd(y);
  if (x == y) return -1;
  w[++tot] = 0;
  fa[tot] = tot;
  fa[x] = tot;
  fa[y] = tot;
  pre[x] = tot;
  pre[y] = tot;
  return tot;
}
vector<int> qry[maxn], g[maxn];
int ans[maxn];
int dfn[maxn], idx, sz[maxn], be[maxn];
void dfs(int u) {
  dfn[++idx] = u;
  be[u] = idx;
  sz[u] = 1;
  for (int v : g[u]) {
    dfs(v);
    sz[u] += sz[v];
  }
  return;
}
int mx_id[maxn << 2];
void up(int rt) {
  if (w[mx_id[rt << 1]] > w[mx_id[rt << 1 | 1]])
    mx_id[rt] = mx_id[rt << 1];
  else
    mx_id[rt] = mx_id[rt << 1 | 1];
  return;
}
void build(int rt, int l, int r) {
  if (l == r) {
    mx_id[rt] = dfn[l];
    return;
  }
  build(rt << 1, l, ((l + r) >> 1));
  build(rt << 1 | 1, ((l + r) >> 1) + 1, r);
  up(rt);
  return;
}
int Qry(int rt, int l, int r, int L, int R) {
  if (L <= l && r <= R) {
    return mx_id[rt];
  }
  int id = 0;
  if (L <= ((l + r) >> 1)) id = Qry(rt << 1, l, ((l + r) >> 1), L, R);
  if (R > ((l + r) >> 1)) {
    int t = Qry(rt << 1 | 1, ((l + r) >> 1) + 1, r, L, R);
    if (w[id] <= w[t]) id = t;
  }
  return id;
}
void update(int rt, int l, int r, int pos) {
  if (l == r) {
    w[dfn[pos]] = 0;
    return;
  }
  if (pos <= ((l + r) >> 1))
    update(rt << 1, l, ((l + r) >> 1), pos);
  else
    update(rt << 1 | 1, ((l + r) >> 1) + 1, r, pos);
  up(rt);
  return;
}
void sol(int rt) {
  idx = 0;
  dfs(rt);
  build(1, 1, idx);
  for (int i = 1; i <= idx; ++i) {
    if (qry[dfn[i]].size() == 0) continue;
    for (int j = qry[dfn[i]].size() - 1; j >= 0; --j) {
      int id = qry[dfn[i]][j];
      int tt = Qry(1, 1, idx, i, i + sz[dfn[i]] - 1);
      ans[id] = w[tt];
      update(1, 1, idx, be[tt]);
    }
  }
}
vector<int> root;
int main() {
  scanf("%d%d%d", &n, &m, &q);
  for (int i = (1); i < (n + 1); ++i) scanf("%d", &w[i]), fa[i] = i;
  for (int i = (1); i < (m + 1); ++i) scanf("%d%d", &a[i], &b[i]);
  for (int i = (1); i < (q + 1); ++i) {
    scanf("%d%d", &op[i], &c[i]);
    if (op[i] == 2) vis[c[i]] = 1;
  }
  tot = n;
  for (int i = (1); i < (m + 1); ++i) {
    if (!vis[i]) link(a[i], b[i]);
  }
  for (int i = q; i > 0; --i) {
    if (op[i] == 1) {
      int rt = fnd(c[i]);
      qry[rt].push_back(i);
    } else {
      link(a[c[i]], b[c[i]]);
    }
  }
  root.clear();
  for (int i = (1); i < (tot + 1); ++i) {
    if (pre[i] == 0)
      root.push_back(i);
    else
      g[pre[i]].push_back(i);
  }
  for (int x : root) {
    sol(x);
  }
  for (int i = 1; i <= q; ++i) {
    if (op[i] == 1) printf("%d\n", ans[i]);
  }
}
