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;
using pii = pair<int, int>;
struct Node {
  int val = 0;
  map<int, bool> con;
};
using Graph = Node[200005];
Graph v;
vector<pii> ithEdge;
int main() {
  ithEdge.emplace_back(0, 0);
  int n, m, q;
  cin >> n >> m >> q;
  for (int i = 1; i <= n; i++) {
    cin >> v[i].val;
  }
  for (int i = 1; i <= m; i++) {
    int x, y;
    cin >> x >> y;
    ithEdge.emplace_back(x, y);
    v[x].con[y] = true;
    v[y].con[x] = true;
  }
  for (int i = 1; i <= q; i++) {
    int qt, x;
    cin >> qt >> x;
    if (qt == 1) {
      int umax = v[x].val, upos = x;
      for (auto& it : v[x].con) {
        if (v[it.first].val > umax) {
          umax = v[it.first].val;
          upos = it.first;
        }
      }
      cout << umax << '\n';
      v[upos].val = 0;
    } else {
      int a = ithEdge[x].first, b = ithEdge[x].second;
      v[a].con.erase(b);
      v[b].con.erase(a);
      ithEdge.erase(begin(ithEdge) + x);
    }
  }
  return 0;
}
