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("O3")
const double PI = acos(-1);
template <class A, class B>
std::ostream& operator<<(std::ostream& st, const std::pair<A, B> p) {
  st << "(" << p.first << ", " << p.second << ")";
  return st;
}
using namespace std;
int n, m, Q;
std::vector<int> perm, id, W, timestamp;
std::vector<int> fr, to, usable;
std::vector<std::pair<int, int> > queries;
std::vector<int> readFrom, dead;
vector<std::vector<std::pair<int, int> > > cand;
void read() {
  scanf("%d %d %d", &n, &m, &Q);
  readFrom.resize(Q);
  timestamp.resize(n);
  dead.resize(n + 1);
  cand.resize(n);
  perm.resize(n);
  id.resize(n);
  W.resize(n);
  fr.resize(m);
  to.resize(m);
  usable.resize(m);
  queries.resize(Q);
  readFrom.resize(Q);
  for (int i = 0; i < (n); i++) {
    scanf("%d", &perm[i]);
    id[i] = i, W[i] = 1;
  }
  for (int e = 0; e < (m); e++) {
    scanf("%d %d", &fr[e], &to[e]);
    usable[e] = 1;
    fr[e]--, to[e]--;
  }
  for (int q = 0; q < (Q); q++) {
    auto& [t, v] = queries[q];
    scanf("%d %d", &t, &v);
    v--;
    if (t == 1) {
    } else {
      usable[v] = 0;
    }
  }
}
int find(int a) { return (id[a] == a) ? a : find(id[a]); }
void join(int a, int b, int t) {
  a = find(a), b = find(b);
  if (a == b) return;
  if (W[a] < W[b]) swap(a, b);
  W[a] += W[b];
  id[b] = a;
  timestamp[b] = t;
}
int main() {
  read();
  fill(timestamp.begin(), timestamp.end(), Q);
  for (int e = 0; e < (m); e++)
    if (usable[e]) join(fr[e], to[e], Q);
  for (int q = Q - 1; q >= 0; q--) {
    int t = queries[q].first;
    if (t == 1) {
      int v = queries[q].second;
      readFrom[q] = find(v);
    } else {
      int e = queries[q].second;
      join(fr[e], to[e], q);
    }
  }
  for (int i = 0; i < (n); i++) {
    int a = i;
    int t = Q;
    while (true) {
      cand[a].emplace_back(perm[i], t);
      if (a == id[a]) break;
      t = min(t, timestamp[a]);
      a = id[a];
    }
  }
  for (int i = 0; i < (n); i++) sort(cand[i].begin(), cand[i].end());
  for (int q = 0; q < (Q); q++) {
    int t = queries[q].first;
    if (t != 1) continue;
    int v = readFrom[q];
    while (!cand[v].empty() &&
           (dead[cand[v].back().first] || cand[v].back().second < q))
      cand[v].pop_back();
    int ans = cand[v].empty() ? 0 : cand[v].back().first;
    printf("%d\n", ans);
    dead[ans] = 1;
  }
  return 0;
}
