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;
mt19937 rnd(chrono::high_resolution_clock::now().time_since_epoch().count());
#pragma GCC optimize("Ofast")
#pragma GCC optimize("-O3")
#pragma GCC optmize("sse, sse2, sse3, sse4, avx, abx, avx2, sse4.1")
#pragma GCC optmize("fast-math")
#pragma GCC optimize("unroll-loops")
const int N = 6e5;
vector<int> g[N];
int par[N], x[N], n;
pair<int, int> t[4 * N];
vector<pair<int, int> > e, que;
void build_dsu() {
  for (int i = 0; i < N; ++i) par[i] = i;
}
int find(int a) {
  if (a == par[a]) return a;
  return (par[a] = find(par[a]));
}
void unite(int a, int b) {
  a = find(a);
  b = find(b);
  if (a != b) {
    par[a] = n;
    par[b] = n;
    g[n].push_back(a);
    g[n].push_back(b);
    ++n;
  }
}
vector<int> y;
vector<int> tin, tout;
int timer = 0;
void dfs(int v) {
  y.push_back(v);
  tin[v] = timer++;
  for (auto u : g[v]) dfs(u);
  y.push_back(v);
  tout[v] = timer++;
}
pair<int, int> comb(pair<int, int> a, pair<int, int> b) {
  if (a.first >= b.first) return a;
  return b;
}
void build(int v, int l, int r) {
  if (l == r)
    t[v] = {x[y[l]], y[l]};
  else {
    int m = (l + r) / 2;
    build(v * 2, l, m);
    build(v * 2 + 1, m + 1, r);
    t[v] = comb(t[v * 2], t[v * 2 + 1]);
  }
}
pair<int, int> query(int v, int tl, int tr, int l, int r) {
  if (l > tr || tl > r) return {-1, 0};
  if (l <= tl && tr <= r) return t[v];
  int tm = (tl + tr) / 2;
  return comb(query(v * 2, tl, tm, l, r), query(v * 2 + 1, tm + 1, tr, l, r));
}
void upd(int v, int l, int r, int id, int val) {
  if (l == r)
    t[v] = {val, y[l]};
  else {
    int m = (l + r) / 2;
    if (id <= m)
      upd(v * 2, l, m, id, val);
    else
      upd(v * 2 + 1, m + 1, r, id, val);
    t[v] = comb(t[v * 2], t[v * 2 + 1]);
  }
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie();
  cout.tie();
  ;
  int m, q;
  cin >> n >> m >> q;
  fill(x, x + N, -1);
  e.resize(m);
  build_dsu();
  for (int i = 0; i < n; ++i) cin >> x[i];
  for (int i = 0; i < m; ++i) {
    int v, u;
    cin >> v >> u;
    --v;
    --u;
    e[i] = {v, u};
  }
  int del[m];
  fill(del, del + m, false);
  que.resize(q);
  for (int i = 0; i < q; ++i) {
    int a, b;
    cin >> a >> b;
    --b;
    que[i] = {a, b};
    if (a == 2) {
      del[b] = true;
    }
  }
  for (int i = 0; i < m; ++i)
    if (!del[i]) unite(e[i].first, e[i].second);
  for (int i = q - 1; i >= 0; --i) {
    if (que[i].first == 1) {
      que[i].second = find(que[i].second);
    } else {
      int id = que[i].second;
      unite(e[id].first, e[id].second);
    }
  }
  tin.resize(n);
  tout.resize(n);
  for (int i = 0; i < n; ++i)
    if (par[i] == i) dfs(i);
  build(1, 0, (int)y.size() - 1);
  for (int i = 0; i < q; ++i) {
    if (que[i].first == 1) {
      auto ans = query(1, 0, (int)y.size() - 1, tin[que[i].second],
                       tout[que[i].second]);
      cout << ans.first << endl;
      upd(1, 0, (int)y.size() - 1, tin[ans.second], 0);
      upd(1, 0, (int)y.size() - 1, tout[ans.second], 0);
    }
  }
}
