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 int N_MAX = 2e5, M_MAX = 3e5, Q_MAX = 5e5;
int n, m, q, p[N_MAX];
pair<int, int> E[M_MAX];
int qtype[Q_MAX], qval[Q_MAX];
bool del[M_MAX];
int set_of[N_MAX], new_name[N_MAX], tmp[N_MAX];
vector<int> order;
list<int> in_set[N_MAX];
void u1(int u, int v) {
  if (set_of[u] == set_of[v]) return;
  if (in_set[set_of[u]].size() < in_set[set_of[v]].size()) swap(u, v);
  int to_del = set_of[v];
  for (int x : in_set[to_del]) {
    set_of[x] = set_of[u];
    in_set[set_of[u]].push_back(x);
  }
  in_set[to_del].clear();
}
int l[N_MAX], r[N_MAX], par[N_MAX], rk[N_MAX];
pair<int, int> interval[Q_MAX];
int f2(int u) { return (par[u] == u ? u : par[u] = f2(par[u])); }
void u2(int u, int v) {
  u = f2(u);
  v = f2(v);
  if (u == v) return;
  if (rk[u] < rk[v]) swap(u, v);
  if (rk[u] == rk[v]) rk[u]++;
  par[v] = u;
  l[u] = min(l[u], l[v]);
  r[u] = max(r[u], r[v]);
}
int f[N_MAX];
void init(int a, int b) {
  int k = (a + b) / 2;
  int c1, c2;
  if (a == k)
    c1 = a;
  else {
    init(a, k);
    c1 = f[(a + k) / 2];
  }
  if (k + 1 == b)
    c2 = b;
  else {
    init(k + 1, b);
    c2 = f[(k + 1 + b) / 2];
  }
  f[k] = (p[c1] < p[c2] ? c2 : c1);
}
int mx(int a, int b, int i, int j) {
  if (a == b) return a;
  int k = (a + b) / 2;
  if (a == i && b == j) return f[k];
  if (j <= k) return mx(a, k, i, j);
  if (k + 1 <= i) return mx(k + 1, b, i, j);
  int c1 = mx(a, k, i, k), c2 = mx(k + 1, b, k + 1, j);
  return (p[c1] < p[c2] ? c2 : c1);
}
void upd(int a, int b, int i) {
  if (a == b) {
    p[a] = 0;
    return;
  }
  int k = (a + b) / 2;
  if (i <= k)
    upd(a, k, i);
  else
    upd(k + 1, b, i);
  int c1 = (a == k ? a : f[(a + k) / 2]);
  int c2 = (k + 1 == b ? b : f[(k + 1 + b) / 2]);
  f[k] = (p[c1] < p[c2] ? c2 : c1);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> n >> m >> q;
  for (int i = 0; i < n; i++) cin >> p[i];
  for (int i = 0; i < m; i++) {
    int u, v;
    cin >> u >> v;
    u--;
    v--;
    E[i] = {u, v};
  }
  for (int i = 0; i < q; i++) {
    cin >> qtype[i] >> qval[i];
    qval[i]--;
  }
  for (int i = 0; i < q; i++)
    if (qtype[i] == 2) del[qval[i]] = true;
  for (int i = 0; i < n; i++) {
    in_set[i].push_back(i);
    set_of[i] = i;
  }
  for (int i = 0; i < m; i++)
    if (!del[i]) u1(E[i].first, E[i].second);
  for (int i = q - 1; 0 <= i; i--)
    if (qtype[i] == 2) u1(E[qval[i]].first, E[qval[i]].second);
  for (int i = 0; i < n; i++) {
    if (in_set[i].empty()) continue;
    for (int x : in_set[i]) order.push_back(x);
    in_set[i].clear();
  }
  for (int i = 0; i < n; i++) new_name[order[i]] = i;
  for (int i = 0; i < n; i++) tmp[i] = p[i];
  for (int i = 0; i < n; i++) p[i] = tmp[order[i]];
  for (int i = 0; i < m; i++) {
    E[i].first = new_name[E[i].first];
    E[i].second = new_name[E[i].second];
  }
  for (int i = 0; i < q; i++)
    if (qtype[i] == 1) qval[i] = new_name[qval[i]];
  for (int i = 0; i < n; i++) l[i] = r[i] = par[i] = i;
  for (int i = 0; i < m; i++)
    if (!del[i]) u2(E[i].first, E[i].second);
  for (int i = q - 1; 0 <= i; i--) {
    if (qtype[i] == 1) {
      int f = f2(qval[i]);
      interval[i] = {l[f], r[f]};
    } else
      u2(E[qval[i]].first, E[qval[i]].second);
  }
  init(0, n - 1);
  for (int i = 0; i < q; i++) {
    if (qtype[i] == 2) continue;
    int x = mx(0, n - 1, interval[i].first, interval[i].second);
    cout << p[x] << "\n";
    upd(0, n - 1, x);
  }
  return 0;
}
