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;
struct Tree {
  int value;
  int left, right;
};
struct edge {
  int u, v;
};
struct quest {
  int que_type;
  int edge_id;
};
edge edge_list[300004];
quest que_list[500005];
int root[200005 * 3];
int num[200005];
bool use_edge[300004];
vector<int> tree[200005 * 2];
struct Seg {
  int left, right;
};
Seg node_seg[200005 * 2];
int tree_id;
int find_root(int index) {
  if (root[index] == -1) {
    return index;
  } else {
    return root[index] = find_root(root[index]);
  }
}
void unit(edge e) {
  int root_u = find_root(e.u);
  int root_v = find_root(e.v);
  if (root_u == root_v) {
  } else {
    tree[tree_id].push_back(root_u);
    tree[tree_id].push_back(root_v);
    root[root_u] = tree_id;
    root[root_v] = tree_id;
    tree_id++;
  }
  return;
}
void node2Tree() {
  for (int i = 0; i < m; i++) {
    if (use_edge[i]) {
      unit(edge_list[i]);
    }
  }
  for (int i = q - 1; i >= 0; i--) {
    if (que_list[i].que_type == 2) {
      int que_edge = que_list[i].edge_id;
      edge e = edge_list[que_edge];
      unit(e);
    } else {
      int que_root = find_root(que_list[i].edge_id);
      que_list[i].edge_id = que_root;
    }
  }
  return;
}
int node2leaf_id[200005];
bool vis[200005 * 3];
void DFS(int node, int& leaf_id) {
  vis[node] = true;
  int len = tree[node].size();
  if (len == 0) {
    node2leaf_id[node] = leaf_id;
    node_seg[node].left = node_seg[node].right = leaf_id;
    leaf_id++;
    return;
  }
  node_seg[node].left = leaf_id;
  for (int i = 0; i < len; i++) {
    if (!vis[tree[node][i]]) DFS(tree[node][i], leaf_id);
  }
  node_seg[node].right = leaf_id - 1;
}
Tree seg_tree[200005 * 3];
void UpdataTree(int left, int right, int up_left, int up_right, int data,
                int tree_id) {
  if (left > right || left > up_right || right < up_left) {
    return;
  }
  if (left >= up_left && right <= up_right) {
    seg_tree[tree_id].left = left;
    seg_tree[tree_id].right = right;
    seg_tree[tree_id].value = data;
    return;
  }
  seg_tree[tree_id].left = left;
  seg_tree[tree_id].right = right;
  int mid = (left + right) / 2;
  int left_id = tree_id * 2;
  int right_id = tree_id * 2 + 1;
  UpdataTree(left, mid, up_left, up_right, data, tree_id * 2);
  UpdataTree(mid + 1, right, up_left, up_right, data, tree_id * 2 + 1);
  seg_tree[tree_id].value =
      max(seg_tree[left_id].value, seg_tree[right_id].value);
}
void BuildTree() {
  for (int i = 1; i <= n; i++) {
    int leaf_id = node2leaf_id[i];
    UpdataTree(0, n - 1, leaf_id, leaf_id, num[i], 1);
  }
}
int num2index[200005];
int QuiryTree(int que_left, int que_right, int index) {
  if (seg_tree[index].left > que_right || seg_tree[index].right < que_left) {
    return -1;
  }
  if (seg_tree[index].left >= que_left && seg_tree[index].right <= que_right) {
    return seg_tree[index].value;
  } else {
    return max(QuiryTree(que_left, que_right, index * 2),
               QuiryTree(que_left, que_right, index * 2 + 1));
  }
}
void INIT() {
  memset(node_seg, -1, sizeof(node_seg));
  memset(seg_tree, -1, sizeof(seg_tree));
  memset(node2leaf_id, -1, sizeof(node2leaf_id));
  memset(use_edge, true, sizeof(use_edge));
  memset(root, -1, sizeof(root));
  memset(num2index, -1, sizeof(num2index));
  memset(vis, false, sizeof(vis));
}
int main() {
  INIT();
  scanf("%d%d%d", &n, &m, &q);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &num[i]);
    num2index[num[i]] = i;
  }
  tree_id = n + 1;
  for (int i = 0; i < m; i++) {
    scanf("%d%d", &edge_list[i].u, &edge_list[i].v);
  }
  for (int i = 0; i < q; i++) {
    scanf("%d%d", &que_list[i].que_type, &que_list[i].edge_id);
    if (que_list[i].que_type == 2) {
      que_list[i].edge_id--;
      use_edge[que_list[i].edge_id] = false;
    }
  }
  node2Tree();
  int leaf_id = 0;
  for (int i = tree_id - 1; i > 0; i--) {
    if (!vis[i]) {
      DFS(i, leaf_id);
    }
  }
  BuildTree();
  for (int i = 0; i < q; i++) {
    if (que_list[i].que_type == 1) {
      int que_root = que_list[i].edge_id;
      int que_left = node_seg[que_root].left;
      int que_right = node_seg[que_root].right;
      int ans = QuiryTree(que_left, que_right, 1);
      printf("%d\n", ans);
      int up_index = num2index[ans];
      int up_leaf_index = node2leaf_id[up_index];
      UpdataTree(0, n - 1, up_leaf_index, up_leaf_index, 0, 1);
    }
  }
  return 0;
}
