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>
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
using namespace std;
template <class c>
struct rge {
  c b, e;
};
template <class c>
rge<c> range(c i, c j) {
  return rge<c>{i, j};
}
template <class c>
auto dud(c *x) -> decltype(cerr << *x, 0);
template <class c>
char dud(...);
struct debug {
  template <class c>
  debug &operator<<(const c &) {
    return *this;
  }
};
vector<int> ar;
vector<int> p, rnk;
vector<multiset<pair<int, int> > > st;
void make(int v) {
  p[v] = v;
  rnk[v] = 1;
  st[v].insert(make_pair(-ar[v], v));
}
int par(int v) {
  if (p[v] == v) return v;
  return (p[v] = par(p[v]));
}
void dsu(int a, int b) {
  a = par(a), b = par(b);
  if (a != b) {
    if (rnk[a] > rnk[b]) swap(a, b);
    p[a] = b;
    rnk[b] += rnk[a];
    for (auto &x : st[a]) st[b].insert(x);
    st[a].clear();
  }
}
const int block = 875;
void solve() {
  int n, m, q;
  cin >> n >> m >> q;
  ar.resize(n);
  st.resize(n);
  p.resize(n);
  rnk.resize(n);
  for (auto &i : ar) cin >> i;
  vector<pair<int, int> > e(m);
  for (int i = 0; i < m; ++i) {
    cin >> e[i].first >> e[i].second;
    --e[i].first, --e[i].second;
  }
  vector<pair<int, int> > f(q);
  for (int i = 0; i < q; ++i) {
    cin >> f[i].first >> f[i].second;
    --f[i].second;
  }
  vector<bool> dele(m);
  for (int l = 0; l < q; l += block) {
    int r = min(q - 1, l + block - 1);
    st.clear();
    p.clear();
    rnk.clear();
    st.resize(n);
    p.resize(n);
    rnk.resize(n);
    for (int i = 0; i < n; ++i) make(i);
    vector<bool> del(m);
    for (int i = 0; i <= r; ++i) {
      if (f[i].first == 2) del[f[i].second] = 1;
    }
    for (int i = 0; i < m; ++i) {
      if (!dele[i] && !del[i]) dsu(e[i].first, e[i].second);
    }
    vector<deque<pair<int, int> > > add(n);
    for (int i = l; i <= r; ++i) {
      if (f[i].first == 1) {
        int v = f[i].second;
        int pa = par(v);
        auto ans = *st[pa].begin();
        for (int j = l; j <= r; ++j) {
          if (f[j].first == 2 && !dele[f[j].second]) {
            int comp = par(e[f[j].second].first);
            int comp1 = par(e[f[j].second].second);
            if (comp == pa || comp1 == pa) {
              ans = min(ans, *st[comp].begin());
              ans = min(ans, *st[comp1].begin());
            }
            st[comp].insert(*st[comp1].begin());
            add[comp].push_back(*st[comp1].begin());
            st[comp1].insert(*st[comp].begin());
            add[comp1].push_back(*st[comp].begin());
          }
        }
        cout << -ans.first << '\n';
        int u = par(ans.second);
        st[u].erase(st[u].begin());
        st[u].insert(make_pair(0, ans.second));
        ar[ans.second] = 0;
        for (int j = l; j <= r; ++j) {
          if (f[j].first == 2 && !dele[f[j].second]) {
            int comp = par(e[f[j].second].first);
            int comp1 = par(e[f[j].second].second);
            st[comp].erase(st[comp].find(add[comp].front()));
            add[comp].pop_front();
            st[comp1].erase(st[comp1].find(add[comp1].front()));
            add[comp1].pop_front();
          }
        }
      } else
        dele[f[i].second] = 1;
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int q = 1;
  while (q--) solve();
}
