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 par[300000];
multiset<int, greater<int>> v[300000];
int get(int x) {
  if (par[x] == x) return x;
  return (par[x] = get(par[x]));
}
void add(int x, int y) {
  par[x] = y;
  for (int i : v[x]) v[y].insert(i);
}
void unite(int x, int y) {
  x = get(x);
  y = get(y);
  if (x == y) return;
  if (v[x].size() < v[y].size())
    add(x, y);
  else
    add(y, x);
}
int erasemx(int x) {
  x = get(x);
  int ans = *(v[x].begin());
  v[x].erase(v[x].find(ans));
  v[x].insert(0);
  return ans;
}
int main() {
  int n, m, q;
  cin >> n >> m >> q;
  vector<int> p(n + 1);
  for (int i = 1; i <= n; i++) cin >> p[i];
  vector<pair<int, int>> e(m);
  for (auto &i : e) cin >> i.first >> i.second;
  vector<int> del(m, 0);
  vector<pair<int, int>> u(q);
  for (auto &i : u) {
    cin >> i.first >> i.second;
    if (i.first == 2) del[i.second - 1] = 1;
  }
  for (int i = 1; i <= n; i++) {
    par[i] = i;
    v[i].insert(p[i]);
  }
  for (int i = 0; i < m; i++) {
    if (!del[i]) unite(e[i].first, e[i].second);
  }
  reverse(u.begin(), u.end());
  vector<int> ans;
  for (auto i : u) {
    if (i.first == 1)
      ans.push_back(erasemx(i.second));
    else
      unite(e[i.second].first, e[i.second].second);
  }
  for (int i : ans) cout << i << '\n';
}
