#include <bits/stdc++.h>
using namespace std;
using pr = pair<int, int>;
int N, M, Q, A[200005], par[200005];
pr E[300005], QS[500005];
bool chk[300005];
set<int> s[200005];
stack<pr> st;
int f(int x) { return par[x] = (par[x] == x ? x : f(par[x])); }
void uni(int x, int y) {
  x = f(x), y = f(y);
  if (x == y) return;
  if (s[x].size() > s[y].size()) swap(x, y);
  st.push(pr(x, y));
  for (auto it : s[x]) s[y].insert(it);
  par[x] = y;
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0);
  cin >> N >> M >> Q;
  iota(par, par + N + 1, 0);
  for (int i = 1; i <= N; i++) cin >> A[i], s[i].insert(A[i]);
  for (int i = 1, x, y; i <= M; i++) {
    cin >> x >> y;
    E[i] = pr(x, y);
  }
  for (int i = 1, x, y; i <= Q; i++) {
    cin >> x >> y;
    QS[i] = pr(x, y);
    if (x == 2) chk[y] = 1;
  }
  for (int i = 1; i <= M; i++)
    if (!chk[i]) uni(E[i].first, E[i].second);
  for (int i = Q; i; i--) {
    if (QS[i].first == 1)
      QS[i].second = f(QS[i].second);
    else {
      int x = E[QS[i].second].first, y = E[QS[i].second].second;
      if (f(x) == f(y))
        QS[i].first = 0;
      else
        uni(x, y);
    }
  }
  for (int i = 1; i <= Q; i++) {
    if (QS[i].first == 1) {
      int p = QS[i].second;
      int ans = 0;
      if (s[p].size() > 0) {
        ans = *s[p].rbegin();
        s[p].erase(ans);
      }
      cout << ans << "\n";
    } else if (QS[i].first == 2) {
      int x = st.top().first, y = st.top().second;
      st.pop();
      set<int> tmp;
      for (auto it : s[x])
        if (s[y].find(it) != s[y].end()) {
          tmp.insert(it);
          s[y].erase(it);
        }
      s[x] = tmp;
    }
  }
}
