#include <bits/stdc++.h>
using namespace std;
using st = size_t;
using pii = pair<int, int>;
inline int readInt() {
  int x = 0, f = 1;
  char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (isdigit(ch)) {
    x = (x << 3) + (x << 1) + ch - '0';
    ch = getchar();
  }
  return x * f;
}
inline void writeInt(const int &a, const char &c) { printf("%d%c", a, c); }
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 = readInt(), m = readInt(), q = readInt();
  gr.resize(n + 1);
  vector<int> ps(n + 1);
  for (st i = 1; i <= n; i++) ps[i] = readInt();
  vector<pii> es(m + 1);
  for (st i = 1; i <= m; i++) es[i].first = readInt(), es[i].second = readInt();
  vector<bool> es_to_del(m + 1, true);
  vector<pii> qs(q);
  for (st i = 0; i < q; i++) {
    qs[i].first = readInt();
    qs[i].second = readInt();
    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);
    writeInt(p.first, '\n');
  }
}
int main() {
  cin.tie(0);
  cout.tie(0);
  ios::sync_with_stdio(0);
  int t = 1;
  for (; t--;) {
    solve();
  }
}
