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;
void delete_edge(vector<vector<int>> &edges, vector<set<int>> &neighbors,
                 int x) {
  int v1 = edges[x - 1][0], v2 = edges[x - 1][1];
  edges.erase(edges.begin() + x - 1);
  neighbors[v1 - 1].erase(v2);
  neighbors[v2 - 1].erase(v1);
}
int run_query(vector<set<int>> neighbors, vector<int> &p, int v) {
  int ans = p[v - 1], maxVertex = v;
  set<int> visited = neighbors[v - 1], mising = neighbors[v - 1];
  while (!mising.empty()) {
    for (auto u : mising) {
      if (p[u - 1] > ans) {
        ans = p[u - 1];
        maxVertex = u;
      }
      for (auto t : neighbors[u - 1]) {
        if (visited.find(t) == visited.end()) {
          visited.insert(t);
          mising.insert(t);
        }
      }
      mising.erase(u);
    }
  }
  p[maxVertex - 1] = 0;
  return ans;
}
void print_edges(vector<vector<int>> edges) {
  int m = edges.size();
  cout << "Las aristas son:" << endl;
  for (int i = 0; i < m; ++i) {
    cout << edges[i][0] << " - " << edges[i][1] << endl;
  }
}
void print_neighbors(vector<set<int>> neighbors) {
  int n = neighbors.size();
  cout << "Los vecinos son: " << endl;
  for (int i = 0; i < n; ++i) {
    cout << "De " << i + 1 << ": ";
    for (auto v : neighbors[i]) {
      cout << v << " ";
    }
    cout << endl;
  }
}
int main() {
  int n, m, q;
  cin >> n >> m >> q;
  vector<int> p(n);
  for (int i = 0; i < n; ++i) {
    cin >> p[i];
  }
  vector<vector<int>> edges(m);
  for (int i = 0; i < m; ++i) {
    int ai, bi;
    cin >> ai >> bi;
    edges[i].push_back((ai > bi ? bi : ai));
    edges[i].push_back((ai > bi ? ai : bi));
  }
  vector<vector<int>> queries(q);
  for (int i = 0; i < q; ++i) {
    int t, x;
    cin >> t >> x;
    queries[i].push_back(t);
    queries[i].push_back(x);
  }
  vector<set<int>> neighbors(n);
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < m; ++j) {
      int v1 = edges[j][0], v2 = edges[j][1];
      if (i + 1 == v1) {
        neighbors[i].insert(v2);
      }
      if (i + 1 == v2) {
        neighbors[i].insert(v1);
      }
    }
  }
  for (int i = 0; i < q; ++i) {
    int type = queries[i][0], value = queries[i][1];
    if (type == 1) {
      int ans = run_query(neighbors, p, value);
      cout << ans << endl;
    }
    if (type == 2) {
      delete_edge(edges, neighbors, value);
    }
  }
  cout << endl;
  return 0;
}
