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;
using st = size_t;
using pii = pair<int, int>;
int read_int() {
  char c = getc(stdin);
  while (!isdigit(c)) c = getc(stdin);
  int ans = 0;
  while (isdigit(c)) {
    ans = ans * 10 + c - '0';
    c = getc(stdin);
  }
  return ans;
}
struct tree_of_segments {
  struct seg_nd;
  st _n;
  seg_nd *root;
  struct seg_nd {
    pii mx = {-1, -1};
    seg_nd *ln = nullptr, *rn = nullptr;
    void set(int i, int v, int l, int r) {
      if (r - l == 1) {
        mx = {v, i};
        return;
      }
      if (!rn) {
        ln = new seg_nd();
        rn = new seg_nd();
      }
      int m = (l + r) / 2;
      if (i < m)
        ln->set(i, v, l, m);
      else
        rn->set(i, v, m, r);
      mx = max(ln->mx, rn->mx);
    }
    pii get_mx(int ls, int rs, int l, int r) {
      if (ls <= l && rs >= r) return mx;
      if (ls >= r || rs <= l) return {-1, -1};
      if (!rn) return {-1, -1};
      int m = (l + r) / 2;
      return max(ln->get_mx(ls, rs, l, m), rn->get_mx(ls, rs, m, r));
    }
  };
  tree_of_segments(st n) {
    _n = n;
    root = new seg_nd;
  }
  void set(int i, int v) { root->set(i, v, 0, _n); }
  pii mx(int ls, int rs) { return root->get_mx(ls, rs, 0, _n); }
  pii mx(pii seg) { return root->get_mx(seg.first, seg.second, 0, _n); }
};
vector<vector<int>> gr;
struct dsu {
  vector<int> _par;
  st _n;
  dsu(st n) {
    _n = n;
    _par.resize(n + 1);
    for (st i = 1; i <= n; i++) {
      _par[i] = i;
    }
  }
  int par(int i) {
    if (_par[i] == i) return i;
    return _par[i] = par(_par[i]);
  }
  int uni(int a, int b) {
    a = par(a);
    b = par(b);
    if (a == b) return a;
    gr.push_back({a, b});
    _par.push_back(++_n);
    _par[a] = _par[b] = _n;
    return _n;
  }
  int uni(pii e) { return uni(e.first, e.second); }
};
void solve() {
  st n = read_int(), m = read_int(), q = read_int();
  gr.resize(n + 1);
  vector<int> ps(n + 1);
  for (st i = 1; i <= n; i++) ps[i] = read_int();
  vector<pii> es(m + 1);
  for (st i = 1; i <= m; i++)
    es[i].first = read_int(), es[i].second = read_int();
  vector<bool> es_to_del(m + 1, true);
  vector<pii> qs(q);
  for (st i = 0; i < q; i++) {
    qs[i].first = read_int();
    qs[i].second = read_int();
    if (qs[i].first == 2) es_to_del[qs[i].second] = false;
  }
  for (st i = 1; i <= m; i++) {
    if (es_to_del[i]) {
      qs.push_back({2, i});
      q++;
    }
  }
  vector<int> q1s;
  reverse(qs.begin(), qs.end());
  dsu snm(n);
  for (auto q : qs) {
    switch (q.first) {
      case 1:
        q1s.push_back(snm.par(q.second));
        break;
      case 2:
        snm.uni(es[q.second]);
    }
  }
  reverse(q1s.begin(), q1s.end());
  tree_of_segments seg(n);
  vector<pii> segs(snm._n + 1, {-1, -1});
  int lst = 0;
  function<void(int)> dfs = [&](int v) {
    if (segs[v] != pii(-1, -1)) return;
    segs[v].first = lst;
    if ((st)v <= n) seg.set(lst++, ps[v]);
    for (auto &u : gr[v]) dfs(u);
    segs[v].second = lst;
  };
  for (st i = 1; i <= n; i++) {
    dfs(snm.par(i));
  }
  for (auto &x : q1s) {
    auto p = seg.mx(segs[x]);
    seg.set(p.second, 0);
    cout << p.first << endl;
  }
}
int main() {
  cin.tie(0);
  cout.tie(0);
  ios::sync_with_stdio(0);
  int t = 1;
  for (; t--;) {
    solve();
  }
}
