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>
#pragma GCC optimize("Ofast")
using namespace std;
const int maxn = (int)5e5 + 5;
int n, m, Q;
int val[maxn], par[maxn];
vector<int> nodes[maxn];
set<pair<int, int> > nodes2[maxn];
vector<pair<int, int> > E;
int rootfind(int u) {
  if (u == par[u]) return u;
  return rootfind(par[u]);
}
pair<int, int> hist[maxn];
void join(int u, int v, int id) {
  u = rootfind(u), v = rootfind(v);
  if (u == v) return;
  if (nodes[v].size() > nodes[u].size()) swap(u, v);
  for (int w : nodes[v]) {
    nodes[u].push_back(w);
    par[w] = u;
  }
  if (id >= 0) hist[id] = {u, v};
}
void rollback(int id) {
  int u = hist[id].first, v = hist[id].second;
  for (int w : nodes[v]) {
    if (val[w] > 0) {
      nodes2[u].erase({-val[w], w});
      nodes2[v].insert({-val[w], w});
    }
    par[w] = v;
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.setf(ios::fixed);
  cout.precision(0);
  cin >> n >> m >> Q;
  for (int i = 1; i <= n; i++) {
    cin >> val[i];
    par[i] = i;
    nodes[i].push_back(i);
  }
  E.resize(m);
  for (int i = 0; i < m; i++) cin >> E[i].first >> E[i].second;
  vector<bool> mark(m, 0);
  vector<pair<int, int> > Queries(Q);
  for (int i = 0; i < Q; i++) {
    cin >> Queries[i].first >> Queries[i].second;
    if (Queries[i].first == 2) mark[Queries[i].second - 1] = 1;
  }
  for (int i = 0; i < m; i++)
    if (!mark[i]) join(E[i].first, E[i].second, -1);
  for (int i = Q - 1; i >= 0; i--)
    if (Queries[i].first == 2)
      join(E[Queries[i].second - 1].first, E[Queries[i].second - 1].second, i);
  for (int u = 1; u <= n; u++) nodes2[rootfind(u)].insert({-val[u], u});
  for (int i = 0; i < Q; i++) {
    if (Queries[i].first == 1) {
      int u = rootfind(Queries[i].second);
      if (nodes2[u].empty()) {
        cout << 0;
      } else {
        auto jt = *nodes2[u].begin();
        cout << -jt.first;
        val[u] = 0;
        nodes2[u].erase(nodes2[u].begin());
      }
      cout << '\n';
    } else
      rollback(i);
  }
  return 0;
}
