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;
const long long mod = 1000000007;
const unsigned gen_seed =
    std::chrono::system_clock::now().time_since_epoch().count();
std::mt19937_64 gen(gen_seed);
const int MAXN = 200000;
set<std::pair<int, int> > lst[MAXN];
int parent[MAXN];
std::vector<std::vector<int> > tear;
std::vector<int> p;
void make_set(int v) {
  lst[v] = set<std::pair<int, int> >();
  lst[v].insert(make_pair(p[v], v));
  parent[v] = v;
}
int find_set(int v) { return parent[v]; }
void union_sets(int a, int b, int tear_log = -1) {
  a = find_set(a);
  b = find_set(b);
  if (a != b) {
    if (lst[a].size() < lst[b].size()) swap(a, b);
    for (auto v : lst[b]) {
      parent[v.second] = a;
      lst[a].insert(v);
      if (tear_log != -1) tear[tear_log].push_back(v.second);
    }
  }
}
int main() {
  int n, m, q;
  scanf("%d %d %d", &n, &m, &q);
  p.resize(n);
  for (int i = 0; i < n; i++) scanf("%d", &p[i]);
  std::vector<int> u(m), v(m);
  for (int i = 0; i < m; i++) {
    scanf("%d %d", &u[i], &v[i]);
    u[i]--;
    v[i]--;
  }
  std::vector<int> tk(m, 1);
  std::vector<int> tp(q), a(q);
  for (int i = 0; i < q; i++) {
    scanf("%d %d", &tp[i], &a[i]);
    a[i]--;
    if (tp[i] == 2) tk[a[i]] = 0;
  }
  for (int i = 0; i < n; i++) make_set(i);
  for (int i = 0; i < m; i++)
    if (tk[i]) union_sets(u[i], v[i]);
  tear.resize(q);
  for (int i = q - 1; i >= 0; i--) {
    if (tp[i] == 2) {
      union_sets(u[a[i]], v[a[i]], i);
    }
  }
  for (int i = 0; i < q; i++) {
    if (tp[i] == 1) {
      int v = parent[a[i]];
      auto pt = lst[v].end();
      pt--;
      auto x = *pt;
      int u = x.second;
      printf("%d\n", x.first);
      lst[v].erase(pt);
      p[u] = 0;
      lst[v].insert(make_pair(0, u));
    } else if (tear[i].size() > 0) {
      int nv = tear[i][0];
      int ov = parent[nv];
      for (auto v : tear[i]) {
        parent[v] = nv;
        lst[ov].erase(make_pair(p[v], v));
        lst[nv].insert(make_pair(p[v], v));
      }
    }
  }
}
