#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int mxn = 3e5 + 1;
int arr[mxn];
int edgesu[mxn], edgesv[mxn];
int L1[mxn], L2[mxn], par[mxn], sz[mxn];
set<pair<int, int>> LOL[mxn], s[mxn];
int mark[mxn];
struct DSU {
  int connected;
  void init(int n) {
    for (int i = 1; i <= n; ++i) s[i].insert({arr[i], i});
    for (int i = 1; i <= n; i++) {
      par[i] = i, sz[i] = 1;
    }
    connected = n;
  }
  int getPar(int u) {
    if (u != par[u]) return getPar(par[u]);
    return u;
  }
  int getSize(int u) { return sz[getPar(u)]; }
  int getAns(int u) {
    int par2 = getPar(u);
    auto it = *s[par2].rbegin();
    s[par2].erase(it);
    arr[it.second] = 0;
    s[par2].insert({0, it.second});
    return it.first;
  }
  void unite(int u, int v, int val) {
    int par1 = getPar(u), par2 = getPar(v);
    if (par1 == par2) return;
    connected--;
    if (sz[par1] > sz[par2]) swap(par1, par2);
    for (auto &x : s[par1]) {
      s[par2].insert(x);
    }
    sz[par2] += sz[par1];
    par[par1] = par[par2];
    if (val) {
      mark[val] = 1;
      LOL[val] = s[par1];
      L1[val] = par1;
      L2[val] = par2;
    }
  }
};
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n, m, q;
  cin >> n >> m >> q;
  int q1[q + 1], q2[q + 1];
  for (int i = 1; i <= n; ++i) cin >> arr[i];
  memset(mark, 0, sizeof(mark));
  for (int i = 1; i <= m; ++i) {
    cin >> edgesu[i] >> edgesv[i];
  }
  for (int i = 1; i <= q; ++i) {
    cin >> q1[i] >> q2[i];
    if (q1[i] == 2) mark[q2[i]] = 1;
  }
  DSU dsu;
  dsu.init(n);
  for (int i = 1; i <= m; ++i) {
    if (mark[i]) continue;
    dsu.unite(edgesu[i], edgesv[i], 0);
  }
  memset(mark, 0, sizeof(mark));
  for (int i = q; i > 0; --i) {
    if (q1[i] == 2) dsu.unite(edgesu[q2[i]], edgesv[q2[i]], q2[i]);
  }
  for (int i = 1; i <= q; ++i) {
    if (q1[i] == 1) {
      cout << dsu.getAns(q2[i]) << '\n';
      ;
    } else {
      if (mark[q2[i]]) {
        int I = q2[i];
        int val = L2[I];
        s[L1[I]].clear();
        for (auto &x : LOL[I]) {
          s[val].erase({arr[x.second], x.second});
          s[L1[I]].insert({arr[x.second], x.second});
        }
        par[L1[I]] = L1[I];
      }
    }
  }
  return 0;
}
