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 long long N = 1e6 + 10, inf = 1e18 + 10;
long long p[N], num[N], was[N], pr[N], sz[N];
pair<long long, long long> rib[N], lr[N], bor[N], t[4 * N];
vector<pair<long long, long long>> r;
vector<long long> have[N];
long long find_pr(long long u) {
  if (pr[u] == u) return u;
  return pr[u] = find_pr(pr[u]);
}
void union_sets_renumber(long long a, long long b) {
  a = find_pr(a);
  b = find_pr(b);
  if (a == b) return;
  if (sz[a] < sz[b]) swap(a, b);
  pr[b] = a;
  sz[a] += sz[b];
  for (auto v : have[b]) num[v] += have[a].size();
  for (auto v : have[b]) have[a].push_back(v);
}
void union_sets_lr(long long a, long long b) {
  a = find_pr(a);
  b = find_pr(b);
  if (a == b) return;
  if (sz[a] < sz[b]) swap(a, b);
  pr[b] = a;
  sz[a] += sz[b];
  lr[a] = {min(lr[a].first, lr[b].first), max(lr[a].second, lr[b].second)};
}
void upd(long long u, long long tl, long long tr, long long pos,
         long long val) {
  if (tl == tr) {
    t[u] = {val, tl};
    return;
  }
  long long tm = (tl + tr) / 2;
  if (pos <= tm)
    upd(2 * u + 1, tl, tm, pos, val);
  else
    upd(2 * u + 2, tm + 1, tr, pos, val);
  t[u] = max(t[2 * u + 1], t[2 * u + 2]);
}
pair<long long, long long> get(long long u, long long tl, long long tr,
                               long long l, long long r) {
  if (l <= tl && tr <= r) return t[u];
  long long tm = (tl + tr) / 2;
  pair<long long, long long> res = {-inf, -1};
  if (l <= tm) res = max(res, get(2 * u + 1, tl, tm, l, r));
  if (r > tm) res = max(res, get(2 * u + 2, tm + 1, tr, l, r));
  return res;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n, m, q;
  cin >> n >> m >> q;
  for (long long i = 0; i < n; ++i) cin >> p[i];
  for (long long i = 0; i < m; ++i) {
    long long u, v;
    cin >> u >> v;
    rib[i] = {u - 1, v - 1};
  }
  for (long long i = 0; i < q; ++i) {
    long long type, v;
    cin >> type >> v;
    if (type == 2) was[v - 1] = 1;
    r.push_back({type, v - 1});
  }
  for (long long i = 0; i < m; ++i) {
    if (was[i] == 0) r.push_back({2, i});
  }
  for (long long i = 0; i < n; ++i)
    pr[i] = i, sz[i] = 1, num[i] = 0, have[i].push_back(i);
  reverse(r.begin(), r.end());
  for (auto v : r) {
    if (v.first == 1) continue;
    union_sets_renumber(rib[v.second].first, rib[v.second].second);
  }
  for (long long i = 1; i < n; ++i) union_sets_renumber(0, i);
  for (long long i = 0; i < n; ++i)
    pr[i] = i, sz[i] = 1, lr[i] = {num[i], num[i]};
  for (long long i = 0; i < r.size(); ++i) {
    if (r[i].first == 1)
      bor[r.size() - 1 - i] = lr[find_pr(r[i].second)];
    else
      union_sets_lr(rib[r[i].second].first, rib[r[i].second].second);
  }
  for (long long i = 0; i < n; ++i) upd(0, 0, n - 1, num[i], p[i]);
  reverse(r.begin(), r.end());
  for (long long i = 0; i < r.size(); ++i) {
    if (r[i].first == 2) continue;
    pair<long long, long long> t =
        get(0, 0, n - 1, bor[i].first, bor[i].second);
    cout << t.first << "\n";
    upd(0, 0, n - 1, t.second, 0);
  }
}
