#include <bits/stdc++.h>
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int rnd(int l, int r) { return l + rng() % (r - l + 1); }
using ii = pair<int, int>;
using ll = long long;
using ull = unsigned long long;
const int N = 5e5 + 5;
int n, m, q, a[2 * N], id[2 * N], o[N];
ii it[N << 3], ed[N], qu[N];
vector<int> ad[N];
int tin[N], tout[N], idx;
int root(int x) { return id[x] == x ? x : id[x] = root(id[x]); }
void join(int u, int v) {
  u = root(u), v = root(v);
  if (u == v) return;
  n++;
  id[n] = n;
  id[u] = n;
  id[v] = n;
  ad[n].push_back(u);
  ad[n].push_back(v);
}
void upd(int i, int l, int r, int pos, ii val) {
  if (pos < l || pos > r) return;
  if (l == r) {
    it[i] = val;
    return;
  }
  int mid = l + (r - l) / 2;
  upd(2 * i, l, mid, pos, val);
  upd(2 * i + 1, mid + 1, r, pos, val);
  it[i] = max(it[2 * i], it[2 * i + 1]);
}
ii que(int i, int l, int r, int u, int v) {
  if (v < l || u > r) return make_pair(0, 0);
  if (u <= l && r <= v) return it[i];
  int mid = l + (r - l) / 2;
  return max(que(2 * i, l, mid, u, v), que(2 * i + 1, mid + 1, r, u, v));
}
int32_t main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  if (fopen("graph"
            ".inp",
            "r")) {
    freopen(
        "graph"
        ".inp",
        "r", stdin);
    freopen(
        "graph"
        ".out",
        "w", stdout);
  }
  cin >> n >> m >> q;
  for (int i = 1, _c = n; i <= _c; ++i) cin >> a[i];
  for (int i = 1, _c = n + m; i <= _c; ++i) id[i] = i;
  for (int i = 1, _c = m; i <= _c; ++i) cin >> ed[i].first >> ed[i].second;
  for (int i = 1, _c = q; i <= _c; ++i) {
    cin >> qu[i].first >> qu[i].second;
    if (qu[i].first == 2) o[qu[i].second] = 1;
  }
  for (int i = 1, _c = m; i <= _c; ++i)
    if (!o[i]) {
      join(ed[i].first, ed[i].second);
    }
  for (int i = q, _c = 1; i >= _c; --i)
    if (qu[i].first == 2) {
      int x = qu[i].second;
      join(ed[x].first, ed[x].second);
    } else {
      qu[i].second = root(qu[i].second);
    }
  function<void(int)> dfs = [&](int u) {
    tin[u] = ++idx;
    for (auto &v : ad[u]) {
      dfs(v);
    }
    tout[u] = idx;
  };
  for (int i = 1, _c = n; i <= _c; ++i)
    if (root(i) == i) dfs(i);
  for (int i = 1, _c = n; i <= _c; ++i)
    upd(1, 1, n, tin[i], make_pair(a[i], tin[i]));
  for (int i = 1, _c = q; i <= _c; ++i)
    if (qu[i].first == 1) {
      int u = qu[i].second;
      ii ans = que(1, 1, n, tin[u], tout[u]);
      cout << ans.first << '\n';
      upd(1, 1, n, ans.second, make_pair(0, ans.second));
    }
}
