#include <bits/stdc++.h>
void solve();
int main(int argc, char* argv[]) {
  ::std::ios::sync_with_stdio(false);
  ::std::cin.tie(0);
  ::std::cout.tie(0);
  int tc = 1;
  while (tc--) solve();
  return 0;
}
using ll = long long;
using pii = std::pair<int, int>;
using vi = std::vector<int>;
using vii = std::vector<pii>;
using std::cin;
using std::cout;
using std::string;
using std::vector;
const int inf = 0x3f3f3f3f;
const int MOD = 998244853;
const int N = 500000 + 5;
int n, m, q;
pii e[N], que[N], t[N * 2];
vi adj[N];
int tin[N], tout[N], timer;
int par[N], arr[N];
bool del[N];
int get_father(int x) {
  if (x != par[x]) par[x] = get_father(par[x]);
  return par[x];
}
void dsu_union(int x, int y) {
  x = get_father(x);
  y = get_father(y);
  if (x == y) return;
  ++n;
  par[n] = n;
  par[x] = n;
  par[y] = n;
  adj[n].push_back(x);
  adj[n].push_back(y);
}
void dfs(int x) {
  tin[x] = ++timer;
  for (int y : adj[x]) dfs(y);
  tout[x] = timer;
}
pii segMax(int l, int r) {
  pii ans(0, 0);
  ++r;
  for (l += timer, r += timer; l < r; l /= 2, r /= 2) {
    if (l & 1) ans = std::max(ans, t[l++]);
    if (r & 1) ans = std::max(ans, t[--r]);
  }
  return ans;
}
void updatePos(int x, pii value) {
  x += timer;
  t[x] = value;
  while (x > 1) {
    x /= 2;
    t[x] = std::max(t[x * 2], t[x * 2 + 1]);
  }
}
void solve() {
  cin >> n >> m >> q;
  for (int i = 1; i <= n; ++i) cin >> arr[i];
  for (int i = 1; i <= m; ++i) {
    int u, v;
    cin >> u >> v;
    e[i] = pii(u, v);
  }
  for (int i = 1; i <= q; ++i) {
    int a, b;
    cin >> a >> b;
    que[i] = pii(a, b);
    if (a == 2) del[b] = true;
  }
  for (int i = 1; i <= n; ++i) par[i] = i;
  for (int i = 1; i <= m; ++i) {
    if (!del[i]) dsu_union(e[i].first, e[i].second);
  }
  for (int i = q; i >= 1; --i) {
    int type = que[i].first;
    if (type == 2) {
      int id = que[i].second;
      dsu_union(e[id].first, e[id].second);
    } else {
      que[i].second = get_father(que[i].second);
    }
  }
  for (int i = 1; i <= n; ++i) {
    if (get_father(i) == i) dfs(i);
  }
  for (int i = 1; i <= n; ++i) {
    updatePos(tin[i], pii(arr[i], tin[i]));
  }
  for (int i = 1; i <= q; ++i) {
    int type = que[i].first;
    if (type == 2) continue;
    int v = que[i].second;
    pii mx = segMax(tin[v], tout[v]);
    if (mx.first == 0)
      cout << 0 << '\n';
    else {
      cout << mx.first << '\n';
      updatePos(mx.second, pii(0, 0));
    }
  }
}
