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 max_vertex(vector<bool>& visited, int vertex,
               vector<vector<int> > adjacency, int* vertice_values) {
  visited[vertex] = true;
  int max_value = vertice_values[vertex];
  int max_index = vertex;
  for (int i : adjacency[vertex]) {
    if (!visited[i]) {
      int mmaxindex = max_vertex(visited, i, adjacency, vertice_values);
      if (vertice_values[mmaxindex] > max_value) {
        max_index = mmaxindex;
      }
    }
  }
  return max_index;
}
int main() {
  int n, m, q;
  cin >> n >> m >> q;
  int vertice_values[n];
  vector<vector<int> > adjacency;
  for (int i = 0; i < n; ++i) {
    cin >> vertice_values[i];
    adjacency.push_back(vector<int>());
  }
  vector<pair<int, int> > edges;
  for (int i = 0; i < m; ++i) {
    int v1, v2;
    cin >> v1 >> v2;
    edges.push_back(make_pair(v1 - 1, v2 - 1));
    adjacency[v1 - 1].push_back(v2 - 1);
    adjacency[v2 - 1].push_back(v1 - 1);
  }
  for (int i = 0; i < q; ++i) {
    int query, qval;
    cin >> query >> qval;
    if (query == 2) {
      pair<int, int> edge = edges[qval - 1];
      vector<int>::iterator position =
          std::find(adjacency[edge.first].begin(), adjacency[edge.first].end(),
                    edge.second);
      adjacency[edge.first].erase(position);
      position = std::find(adjacency[edge.second].begin(),
                           adjacency[edge.second].end(), edge.first);
      adjacency[edge.second].erase(position);
    } else {
      vector<bool> visited;
      for (int i = 0; i < n; ++i) {
        visited.push_back(false);
      }
      int max_index = max_vertex(visited, qval - 1, adjacency, vertice_values);
      cout << vertice_values[max_index] << endl;
      vertice_values[max_index] = 0;
    }
  }
}
