#include <bits/stdc++.h>
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
const int maxn = 5e5 + 5;
int U[maxn], V[maxn], type[maxn], id[maxn];
int tin[maxn], tout[maxn], par[maxn], a[maxn], root[maxn];
int N, M, Q;
bool del[maxn];
vector<int> adj[maxn];
pair<int, int> tr[4 * maxn];
int finds(int u) {
  if (par[u] == u) return u;
  return par[u] = finds(par[u]);
}
void merges(int u, int v) {
  u = finds(u);
  v = finds(v);
  if (u == v) return;
  ++N;
  par[N] = N;
  par[u] = N;
  par[v] = N;
  adj[N].emplace_back(u);
  adj[N].emplace_back(v);
}
void upd(int pos, pair<int, int> v, int id = 1, int l = 1, int r = N) {
  if (l == r) {
    tr[id] = v;
    return;
  }
  int mid = (l + r) / 2;
  if (pos <= mid)
    upd(pos, v, id << 1, l, mid);
  else
    upd(pos, v, id << 1 | 1, mid + 1, r);
  tr[id] = max(tr[id << 1], tr[id << 1 | 1]);
}
pair<int, int> query(int L, int R, int id = 1, int l = 1, int r = N) {
  if (R < l || r < L) return make_pair(0, 0);
  if (L <= l && r <= R) return tr[id];
  int mid = (l + r) / 2;
  return max(query(L, R, id << 1, l, mid),
             query(L, R, id << 1 | 1, mid + 1, r));
}
void dfs(int u) {
  static int nTime = 0;
  tin[u] = ++nTime;
  for (int v : adj[u]) {
    dfs(v);
  }
  tout[u] = nTime;
}
signed main(void) {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> N >> M >> Q;
  iota(par + 1, par + 1 + N, 1);
  for (int i = 1; i <= N; ++i) {
    cin >> a[i];
  }
  for (int i = 1; i <= M; ++i) {
    cin >> U[i] >> V[i];
  }
  for (int i = 1; i <= Q; ++i) {
    cin >> type[i] >> id[i];
    if (type[i] == 2) {
      del[id[i]] = true;
    }
  }
  for (int i = 1; i <= M; ++i) {
    if (!del[i]) {
      merges(U[i], V[i]);
    }
  }
  for (int i = Q; i >= 1; --i) {
    if (type[i] == 1) {
      root[i] = finds(id[i]);
    } else {
      merges(U[id[i]], V[id[i]]);
    }
  }
  for (int i = 1; i <= N; ++i) {
    if (finds(i) == i) {
      dfs(i);
    }
  }
  for (int i = 1; i <= N; ++i) {
    upd(tin[i], make_pair(a[i], i));
  }
  for (int i = 1; i <= Q; ++i) {
    if (type[i] == 1) {
      pair<int, int> res = query(tin[root[i]], tout[root[i]]);
      cout << res.first << '\n';
      upd(tin[res.second], make_pair(0, res.second));
    }
  }
}
