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 wi[100001];
int vis[100001];
vector<int> adlist[100001];
vector<pair<int, int> > edge_num;
int maX = -1;
int node;
void deleteE(int num) {
  int fi = edge_num[num].first;
  int se = edge_num[num].second;
  for (int i = 0; i < adlist[fi].size(); i++) {
    if (adlist[fi][i] == se) {
      adlist[fi].erase(adlist[fi].begin() + i);
      break;
    }
  }
  for (int i = 0; i < adlist[se].size(); i++) {
    if (adlist[se][i] == fi) {
      adlist[se].erase(adlist[se].begin() + i);
      break;
    }
  }
}
void dfs(int v) {
  vis[v] = 1;
  if (maX <= wi[v]) {
    maX = wi[v];
    node = v;
  }
  for (int i = 0; i < adlist[v].size(); i++) {
    int child = adlist[v][i];
    if (vis[child] == 0) {
      vis[child] = 1;
      dfs(child);
    }
  }
}
int main() {
  int n, m, q, a, b;
  cin >> n >> m >> q;
  for (int i = 1; i <= n; i++) {
    cin >> wi[i];
  }
  for (int i = 1; i <= m; i++)
    cin >> a >> b, adlist[a].push_back(b), adlist[b].push_back(a),
        edge_num.push_back(make_pair(a, b));
  int t, v;
  for (int i = 1; i <= q; i++) {
    cin >> t >> v;
    if (t == 1) {
      dfs(v);
      cout << wi[node] << endl;
      wi[node] = 0;
      maX = -1;
    } else
      deleteE(v - 1);
  }
}
