#include <bits/stdc++.h>
using namespace std;
const int N = 200005, M = 300005, Q = 500005;
int p[N];
struct I_have_no_idea_what_this_is {
  bool operator()(int a, int b) { return p[a] > p[b]; }
};
set<int, I_have_no_idea_what_this_is> s[N];
int n, m, q, x[M], y[M], e[N], g[Q][2], o[N], _x[Q], _y[Q];
void R(int i, int vl) {
  auto it = s[i].find(vl);
  if (it != s[i].end()) s[i].erase(it);
}
int O(int x) { return ((o[x] ^ x) ? o[x] = O(o[x]) : x); }
void U(int a, int b, int i) {
  a = O(a), b = O(b);
  if (a == b) return;
  if (s[a].size() > s[b].size()) {
    g[i][0] = a, g[i][1] = b;
    o[b] = a;
    for (auto it : s[b]) {
      e[it] = a;
      s[a].insert(it);
    }
  } else {
    g[i][0] = b, g[i][1] = a;
    o[a] = b;
    for (auto it : s[a]) {
      e[it] = b;
      s[b].insert(it);
    }
  }
}
void D(int i) {
  int a = g[i][0], b = g[i][1];
  for (auto it = s[b].begin(); it != s[b].end();) {
    R(a, *it);
    e[*it] = b;
    if (!p[*it])
      s[b].erase(it++);
    else
      ++it;
  }
}
int P(int a) {
  a = e[a];
  if (!s[a].size()) return 0;
  int dr = p[*s[a].begin()];
  p[*s[a].begin()] = 0;
  s[a].erase(s[a].begin());
  return dr;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> m >> q;
  for (int i = 1; i <= n; ++i) {
    cin >> p[i];
  }
  for (int i = 1; i <= n; ++i) {
    o[i] = e[i] = i;
    s[i].insert(i);
  }
  for (int i = 1; i <= m; ++i) {
    cin >> x[i] >> y[i];
  }
  vector<bool> bo(m + 1, 0);
  for (int i = 1; i <= q; ++i) {
    cin >> _x[i] >> _y[i];
    if (_x[i] == 2) bo[_y[i]] = 1;
  }
  for (int i = 1; i <= m; ++i) {
    if (!bo[i]) U(x[i], y[i], 0);
  }
  for (int i = q; i >= 1; --i) {
    if (_x[i] == 2) U(x[_y[i]], y[_y[i]], i);
  }
  for (int i = 1; i <= q; ++i) {
    if (_x[i] == 2)
      D(i);
    else
      cout << P(_y[i]) << "\n";
  }
  return 0;
}
