#include <bits/stdc++.h>
using namespace std;
const long long q = 239017;
const long long mod = 1e9 + 7;
const long long mod2 = 1e9 + 13;
const long long N = 2e5 + 100;
const long long M = 3e5 + 100;
const long long L = 26;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
long long p[N];
pair<long long, long long> seg[N];
vector<long long> comp[N];
long long c[N];
pair<long long, long long> qrSeg[N + M];
bitset<M> del;
long long get(long long a) {
  if (p[a] == a) return a;
  return p[a] = get(p[a]);
}
void merge(long long a, long long b) {
  a = get(a);
  b = get(b);
  if (a == b) return;
  if ((long long)comp[a].size() < (long long)comp[b].size()) swap(a, b);
  p[b] = a;
  seg[a].second = seg[b].second;
  for (long long el : comp[b]) comp[a].push_back(el);
  comp[b].clear();
}
struct SegTree {
  vector<long long> t, id;
  long long n;
  void update(long long v) {
    t[v] = max(t[v * 2], t[v * 2 + 1]);
    if (t[v * 2] > t[v * 2 + 1])
      id[v] = id[v * 2];
    else
      id[v] = id[v * 2 + 1];
  }
  void build(long long tl, long long tr, long long v, vector<long long>& a) {
    if (tl + 1 == tr) {
      t[v] = a[tl];
      id[v] = tl;
      return;
    }
    long long mid = (tl + tr) >> 1;
    build(tl, mid, v * 2, a);
    build(mid, tr, v * 2 + 1, a);
    update(v);
  }
  SegTree(vector<long long>& a) {
    if (a.empty()) return;
    n = (long long)a.size();
    t.resize(4 * n);
    id.resize(4 * n);
    build(0, n, 1, a);
  }
  void del(long long tl, long long tr, long long v, long long k) {
    if (tl > k || tr <= k) return;
    if (tl + 1 == tr && tl == k) {
      t[v] = 0;
      return;
    }
    long long mid = (tl + tr) >> 1;
    del(tl, mid, v * 2, k);
    del(mid, tr, v * 2 + 1, k);
    update(v);
  }
  pair<long long, long long> get_mx(long long tl, long long tr, long long v,
                                    long long l, long long r) {
    if (tr <= l || tl >= r) return {-(long long)1e18, 1337};
    if (l <= tl && tr <= r) return {t[v], id[v]};
    long long mid = (tl + tr) >> 1;
    auto a = get_mx(tl, mid, v * 2, l, r);
    auto b = get_mx(mid, tr, v * 2 + 1, l, r);
    return (a.first > b.first ? a : b);
  }
  pair<long long, long long> get_mx(long long l, long long r) {
    return get_mx(0, n, 1, l, r + 1);
  }
};
void $main() {
  long long n, m, q;
  cin >> n >> m >> q;
  for (long long i = 0; i < n; ++i) cin >> c[i];
  for (long long i = 0; i < n; ++i) {
    p[i] = i;
    seg[i] = {i, i};
    comp[i].push_back(i);
  }
  vector<pair<long long, long long> > r;
  for (long long i = 0; i < m; ++i) {
    long long a, b;
    cin >> a >> b;
    --a;
    --b;
    r.emplace_back(a, b);
  }
  vector<pair<long long, long long> > qr;
  for (long long i = 0; i < q; ++i) {
    long long a, b;
    cin >> a >> b;
    --b;
    qr.emplace_back(a, b);
    if (a != 1) del[b] = 1;
  }
  for (long long i = 0; i < m; ++i)
    if (!del[i]) qr.emplace_back(2, i);
  reverse(qr.begin(), qr.end());
  long long it = 0;
  for (auto el : qr) {
    if (el.first == 2) {
      merge(r[el.second].first, r[el.second].second);
    } else {
      qrSeg[it++] = seg[get(el.second)];
    }
  }
  for (long long i = 0; i < n; ++i) merge(0, i);
  long long root = get(0);
  for (long long i = 0; i < (long long)comp[root].size(); ++i)
    p[comp[root][i]] = i;
  for (long long i = 0; i < it; ++i)
    qrSeg[i] = {p[qrSeg[i].first], p[qrSeg[i].second]};
  for (long long& el : comp[root]) el = c[el];
  SegTree tree = SegTree(comp[root]);
  for (long long i = it - 1; i >= 0; --i) {
    auto get = tree.get_mx(qrSeg[i].first, qrSeg[i].second);
    cout << get.first << '\n';
    tree.del(0, n, 1, get.second);
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0), cout.tie(0);
  $main();
  return 0;
}
