#include <bits/stdc++.h>
#pragma GCC optimize("Ofast,unroll-loops,-ffloat-store")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,fma")
using namespace std;
const int maxn = 1e5 + 5;
int n, m, q, U[maxn * 3], V[maxn * 3], p[maxn << 1];
int tr[maxn * 5], X[maxn * 5];
int sz[maxn << 1], par[maxn << 1], id[maxn << 1];
bool vis[maxn * 5], oke[maxn * 3];
set<int, greater<int> > mys[maxn << 1];
stack<pair<int, int> > st;
vector<int> del;
void readf() {
  cin >> n >> m >> q;
  for (int i = 1; i <= n; ++i) {
    cin >> p[i];
    id[p[i]] = i;
  }
  for (int i = 1; i <= m; ++i) cin >> U[i] >> V[i];
  for (int i = 1; i <= q; ++i) {
    cin >> tr[i] >> X[i];
    if (tr[i] == 2) {
      oke[X[i]] = 1;
      del.emplace_back(X[i]);
    }
  }
}
inline int root(int u) {
  while (u != par[u]) u = par[u];
  return u;
}
void join(int i, int u, int v) {
  u = root(u);
  v = root(v);
  if (u == v) return;
  vis[i] = 1;
  if (sz[u] < sz[v]) swap(u, v);
  for (auto it : mys[v]) mys[u].insert(it);
  if (oke[i] == 1) {
    st.push(pair<int, int>(u, sz[u]));
    st.push(pair<int, int>(v, par[v]));
  }
  sz[u] += sz[v];
  par[v] = u;
}
void roll(int i) {
  if (vis[i] == 0) return;
  pair<int, int> it = st.top();
  st.pop();
  int v = it.first;
  par[v] = it.second;
  it = st.top();
  st.pop();
  int u = it.first;
  sz[u] = it.second;
  for (auto it : mys[v]) mys[u].erase(it);
}
void solve() {
  for (int i = 1; i <= n; ++i) par[i] = i, sz[i] = 1, mys[i].insert(p[i]);
  for (int i = 1; i <= m; ++i)
    if (oke[i] == 0) {
      join(i, U[i], V[i]);
    }
  reverse(del.begin(), del.end());
  for (int i : del) {
    join(i, U[i], V[i]);
  }
  for (int i = 1; i <= q; ++i)
    if (tr[i] == 1) {
      int u = root(X[i]);
      if (mys[u].size() == 0) {
        cout << "0\n";
        continue;
      } else {
        int tmp = (*mys[u].begin());
        cout << tmp << '\n';
        u = id[tmp];
        mys[u].erase(tmp);
        while (u != par[u]) {
          u = par[u];
          mys[u].erase(tmp);
        }
      }
    } else
      roll(X[i]);
}
int main() {
  srand(time(NULL));
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  readf();
  solve();
}
