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 BINF = 9e18, LINF = 2e9, mod = 1e9 + 7, P = 179, Q = 1791791791;
const int MAXN = 3e5 + 6, MAXQ = 5e5 + 6;
int a[MAXN], b[MAXN], p[MAXN];
list<int> cmp[MAXN];
int par[MAXN];
int t[MAXQ], f[MAXQ];
bool ban[MAXN];
int sep[MAXN];
int pos[MAXN], who[MAXN];
int get(int v) {
  if (par[v] == v) return v;
  return par[v] = get(par[v]);
}
int merge(int v, int u) {
  v = get(v), u = get(u);
  if (v == u) return -1;
  par[u] = v;
  int ans = *cmp[u].begin();
  cmp[v].splice(cmp[v].end(), cmp[u]);
  return ans;
}
pair<int, int> tt[4 * MAXN];
void build(int v, int tl, int tr) {
  if (tl == tr) {
    int val = p[who[tl]];
    tt[v] = {val, who[tl]};
  } else {
    int tm = (tl + tr) / 2;
    build(v << 1, tl, tm);
    build(v << 1 ^ 1, tm + 1, tr);
    tt[v] = max(tt[v << 1], tt[v << 1 ^ 1]);
  }
}
pair<int, int> get(int v, int tl, int tr, int l, int r) {
  if (l > tr || tl > r) return {-1, -1};
  if (l <= tl && tr <= r) return tt[v];
  int tm = (tl + tr) / 2;
  return max(get(v << 1, tl, tm, l, r), get(v << 1 ^ 1, tm + 1, tr, l, r));
}
void upd(int v, int tl, int tr, int p, int first) {
  if (tl == tr)
    tt[v] = {first, who[tl]};
  else {
    int tm = (tl + tr) / 2;
    if (p <= tm)
      upd(v << 1, tl, tm, p, first);
    else
      upd(v << 1 ^ 1, tm + 1, tr, p, first);
    tt[v] = max(tt[v << 1], tt[v << 1 ^ 1]);
  }
}
void solve() {
  int n, m, q;
  cin >> n >> m >> q;
  for (int i = 0; i < n; ++i) cin >> p[i], par[i] = i, cmp[i].push_back(i);
  for (int i = 0; i < m; ++i) {
    cin >> a[i] >> b[i];
    --a[i], --b[i];
  }
  for (int i = 0; i < q; ++i) {
    cin >> t[i] >> f[i];
    --f[i];
  }
  for (int i = q - 1; i >= 0; --i)
    if (t[i] == 2) ban[f[i]] = 1;
  for (int i = 0; i < m; ++i)
    if (!ban[i]) merge(a[i], b[i]);
  for (int i = q - 1; i >= 0; --i)
    if (t[i] == 2) sep[i] = merge(a[f[i]], b[f[i]]);
  int ptr = 0;
  set<pair<int, int>> segs;
  for (int i = 0; i < n; ++i)
    if (par[i] == i) {
      int l = ptr;
      for (int v : cmp[i]) {
        who[ptr] = v;
        pos[v] = ptr++;
      }
      int r = ptr - 1;
      segs.insert({l, r});
    }
  build(1, 0, n - 1);
  for (int i = 0; i < q; ++i) {
    if (t[i] == 2) {
      if (sep[i] != -1) {
        int m = pos[sep[i]];
        auto it = segs.lower_bound({m, 1e9});
        --it;
        int l = it->first;
        int r = it->second;
        segs.erase(it);
        segs.insert({l, m - 1});
        segs.insert({m, r});
      }
    } else {
      int v = f[i];
      auto it = segs.lower_bound({pos[v], 1e9});
      --it;
      int l = it->first;
      int r = it->second;
      pair<int, int> pr = get(1, 0, n - 1, l, r);
      upd(1, 0, n - 1, pos[pr.second], 0);
      cout << pr.first << "\n";
    }
  }
  return;
}
signed main() {
  ios_base::sync_with_stdio(false);
  int t = 1;
  for (int i = 0; i < t; ++i) solve();
  return 0;
}
