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 mod = 1e9 + 7;
const int N = 5e5 + 5;
int p[N], fa[N], id[N];
int u[N], v[N], vis[N], op[N][2];
vector<int> G[N];
int fid(int x) { return fa[x] == x ? x : fa[x] = fid(fa[x]); }
int in[N], out[N], cnt, pos[N];
void dfs(int x) {
  in[x] = ++cnt;
  pos[cnt] = x;
  for (int i : G[x]) {
    dfs(i);
  }
  out[x] = cnt;
}
struct node {
  int x, id;
} tree[N << 2];
void pushup(int root) {
  if (tree[root << 1].x > tree[root << 1 | 1].x)
    tree[root] = tree[root << 1];
  else
    tree[root] = tree[root << 1 | 1];
}
void build(int root, int l, int r) {
  if (l == r) {
    tree[root].x = p[pos[l]];
    tree[root].id = l;
    return;
  }
  int mid = (l + r) >> 1;
  build(root << 1, l, mid);
  build(root << 1 | 1, mid + 1, r);
  pushup(root);
}
void update(int root, int l, int r, int po) {
  if (l == r) {
    tree[root].x = 0;
    return;
  }
  int mid = (l + r) >> 1;
  if (po <= mid)
    update(root << 1, l, mid, po);
  else
    update(root << 1 | 1, mid + 1, r, po);
  pushup(root);
}
node query(int root, int l, int r, int L, int R) {
  if (L <= l && r <= R) {
    return tree[root];
  }
  int mid = (l + r) >> 1;
  node tmp1, tmp2;
  tmp1.x = tmp2.x = 0;
  if (L <= mid) tmp1 = query(root << 1, l, mid, L, R);
  if (R > mid) tmp2 = query(root << 1 | 1, mid + 1, r, L, R);
  if (tmp1.x > tmp2.x) return tmp1;
  return tmp2;
}
int main() {
  int n, m, q;
  scanf("%d%d%d", &n, &m, &q);
  for (int i = 1; i <= n; i++) {
    fa[i] = i;
    scanf("%d", &p[i]);
  }
  for (int i = 1; i <= m; i++) {
    scanf("%d%d", &u[i], &v[i]);
  }
  for (int i = 1; i <= q; i++) {
    fa[n + i] = n + i;
    scanf("%d%d", &op[i][0], &op[i][1]);
    if (op[i][0] == 2) {
      vis[op[i][1]] = 1;
    }
  }
  for (int i = 1; i <= m; i++) {
    if (vis[i]) continue;
    int uu = fid(u[i]), vv = fid(v[i]);
    if (uu == vv) continue;
    fa[uu] = vv;
    G[vv].push_back(uu);
  }
  for (int i = q; i > 0; i--) {
    int x = op[i][1];
    if (op[i][0] == 1) {
      id[i] = fid(x);
      continue;
    }
    int uu = fid(u[x]), vv = fid(v[x]);
    if (uu != vv) {
      n++;
      fa[uu] = fa[vv] = n;
      G[n].push_back(uu);
      G[n].push_back(vv);
    }
  }
  for (int i = 1; i <= n; i++) {
    if (in[i]) continue;
    dfs(fid(i));
  }
  build(1, 1, cnt);
  for (int i = 1; i <= q; i++) {
    if (op[i][0] == 2) continue;
    node maxx = query(1, 1, cnt, in[id[i]], out[id[i]]);
    if (maxx.x > 0) update(1, 1, cnt, maxx.id);
    printf("%d\n", maxx.x);
  }
  return 0;
}
