#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
const vector<int> mods = {998244353, 1000000007, 1000000009};
const long long inf = 3e18;
const double pi = acos(-1.0);
const double eps = 0.0000001;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
template <class... K>
using umap = unordered_map<K...>;
template <class... K>
using uset = unordered_set<K...>;
const int N = 500100;
int n, m, q, u, v, ty, x, p[N], par[N], siz[N];
set<pair<int, int> > mns[N];
vector<int> g[N];
int egs[N][3], qs[N][2];
uset<int> lt;
void build() {
  for (long long i = (0); i < (n); ++i) {
    mns[i].insert({p[i], i});
    par[i] = i;
    siz[i] = 1;
  }
}
inline int fnd(int x) { return par[x] == x ? x : fnd(par[x]); }
bool unn(int e) {
  int x = egs[e][0], y = egs[e][1];
  int rx = fnd(x), ry = fnd(y);
  if (rx == ry) return 0;
  if (siz[rx] < siz[ry]) swap(rx, ry);
  siz[rx] += siz[ry];
  par[ry] = rx;
  g[rx].push_back(ry);
  egs[e][2] = ry;
  for (auto& mny : mns[ry]) mns[rx].insert(mny);
  mns[ry].clear();
  return 1;
}
void dfs(int x, int rm, int ad) {
  if (p[x]) {
    pair<long long, long long> mn = {p[x], x};
    mns[rm].erase(mns[rm].find(mn));
    mns[ad].insert(mn);
  }
  for (auto& nx : g[x]) dfs(nx, rm, ad);
}
bool splt(int e) {
  if (egs[e][2] == -1) return 0;
  int ry = egs[e][2];
  int rx = fnd(ry);
  g[par[ry]].pop_back();
  par[ry] = ry;
  dfs(ry, rx, ry);
  return 1;
}
int getmn(int x) {
  int rx = fnd(x);
  if (!((int)(mns[rx]).size())) return 0;
  auto pp = --end(mns[rx]);
  p[pp->second] = 0;
  int mn = pp->first;
  mns[rx].erase(pp);
  return mn;
}
int main() {
  cin.sync_with_stdio(0);
  cin.tie(0);
  cout.precision(13);
  cin >> n >> m >> q;
  for (long long i = (0); i < (n); ++i) cin >> p[i];
  build();
  for (long long i = (0); i < (m); ++i) {
    cin >> u >> v;
    u--;
    v--;
    egs[i][0] = u, egs[i][1] = v, egs[i][2] = -1;
  }
  for (long long _q = (0); _q < (q); ++_q) {
    cin >> ty >> x;
    x--;
    qs[_q][0] = ty, qs[_q][1] = x;
    if (ty == 2) lt.insert(x);
  }
  for (long long i = (0); i < (m); ++i) {
    if ((lt.find(i) != end(lt))) continue;
    unn(i);
  }
  for (int _q = q - 1; _q >= 0; _q--) {
    ty = qs[_q][0], x = qs[_q][1];
    if (ty != 2) continue;
    unn(x);
  }
  for (long long _q = (0); _q < (q); ++_q) {
    ty = qs[_q][0], x = qs[_q][1];
    if (ty == 1)
      cout << getmn(x) << "\n";
    else
      splt(x);
  }
  return 0;
}
