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>
struct Node {
  std::set<int> paths;
  std::map<int, int, std::greater<int>> fixed;
  std::set<int> zeroes;
  int val;
  void init();
  void replace_value(int old_val, int new_val, int index) {
    if (old_val == 0) {
      assert(new_val == -1);
      zeroes.erase(index);
    } else {
      auto it = fixed.find(old_val);
      assert(it != fixed.end());
      fixed.erase(it);
      if (new_val == 0) zeroes.insert(index);
    }
  }
  int get() {
    assert(fixed.size() || zeroes.size());
    return fixed.size() ? fixed.begin()->second : *zeroes.begin();
  }
};
std::vector<Node> nodes;
std::vector<std::pair<int, int>> edges;
void Node::init() {
  for (auto it : paths) {
    fixed[nodes[it].val] = it;
  }
}
int main() {
  int n, m, q;
  std::cin >> n >> m >> q;
  nodes.resize(n);
  edges.resize(m);
  for (int i = 0; i < n; i++) {
    int val;
    std::cin >> val;
    nodes[i].val = val;
    nodes[i].paths.insert(i);
  }
  for (int i = 0; i != m; i++) {
    int a, b;
    std::cin >> a >> b;
    a--, b--;
    edges[i] = std::make_pair(a, b);
    nodes[a].paths.insert(b);
    nodes[b].paths.insert(a);
  }
  for (int i = 0; i < n; i++) {
    nodes[i].init();
  }
  for (int i = 0; i != q; i++) {
    int a, b;
    std::cin >> a >> b;
    b--;
    if (a == 1) {
      int node_a = b;
      int node_b = nodes[node_a].get();
      std::cout << nodes[node_b].val << "\n";
      if (nodes[node_b].val) {
        for (auto it : nodes[node_b].paths) {
          nodes[it].replace_value(nodes[node_b].val, 0, node_b);
        }
        nodes[node_b].val = 0;
      }
    } else {
      auto path = edges[b];
      nodes[path.first].paths.erase(path.second);
      nodes[path.second].paths.erase(path.first);
      nodes[path.first].replace_value(nodes[path.second].val, -1, path.second);
      nodes[path.second].replace_value(nodes[path.first].val, -1, path.first);
    }
  }
}
