9 5 14
7 1 4 8 5 2 6 9 3
2 8
1 6
5 7
1 3
3 9
1 5
1 8
1 5
1 4
1 8
1 3
1 5
1 5
1 7
1 7
2 3
1 2
1 1
1 2
 6 5 8
1 2 6 3 4 5
2 4
1 3
1 6
3 5
2 5
1 1
1 4
1 1
2 1
2 5
2 2
2 3
1 4
 2 1 3
1 2
1 2
1 1
1 1
1 1

6
9
5
8
1
7
0
0
0
0
0
4
0
 6
5
4
3
 2
1
0

#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 = 200100;
int n, m, q, u, v, ty, x, p[N], par[N], siz[N];
set<pair<int, int> > mns[N];
uset<int> g[N];
vector<long long> egs[N], qs[N];
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].insert(ry);
  egs[e].push_back(ry);
  for (auto& mny : mns[ry]) mns[rx].insert(mny);
  return 1;
}
void dfs(int x, int rm) {
  if (p[x]) mns[rm].erase(mns[rm].find({p[x], x}));
  for (auto& nx : g[x]) dfs(nx, rm);
}
bool splt(int e) {
  if (((int)(egs[e]).size()) < 3) return 0;
  int ry = egs[e][2];
  int rx = fnd(ry);
  siz[rx] -= siz[ry];
  g[par[ry]].erase(ry);
  par[ry] = ry;
  dfs(ry, rx);
  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] = {u, v};
  }
  for (long long _q = (0); _q < (q); ++_q) {
    cin >> ty >> x;
    x--;
    qs[_q] = {ty, 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;
}
