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;
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 {
  ~debug() { cerr << endl; }
  template <class c>
  typename enable_if<sizeof dud<c>(0) != 1, debug&>::type operator<<(c i) {
    cerr << boolalpha << i;
    return *this;
  }
  template <class c>
  typename enable_if<sizeof dud<c>(0) == 1, debug&>::type operator<<(c i) {
    return *this << range(begin(i), end(i));
  }
  template <class c, class b>
  debug& operator<<(pair<b, c> d) {
    return *this << "(" << d.first << ", " << d.second << ")";
  }
  template <class c>
  debug& operator<<(rge<c> d) {
    *this << "[";
    for (auto it = d.b; it != d.e; ++it) *this << ", " + 2 * (it == d.b) << *it;
    return *this << "]";
  }
};
const int N = 5e5 + 1;
int p[N], tin[N], tout[N], timer = 0;
int get(int v) { return p[v] = (v == p[v] ? v : get(p[v])); }
int n, m, q;
vector<int> g[N];
pair<int, int> t[4 * N];
int a[N];
int obr[N];
void mg(int a, int b) {
  int c = get(a), d = get(b);
  n++;
  p[c] = n;
  p[d] = n;
  g[n].emplace_back(c);
  g[n].emplace_back(d);
  return;
}
void dfs(int v, int p) {
  tin[v] = ++timer;
  obr[timer] = v;
  for (auto& z : g[v]) {
    dfs(z, v);
  }
  tout[v] = timer;
}
void b_tr(int v, int tl, int tr) {
  if (tl == tr) {
    t[v] = {a[obr[tl]], tl};
  } else {
    int tm = (tl + tr) >> 1;
    b_tr(2 * v, tl, tm);
    b_tr(2 * v + 1, tm + 1, tr);
    t[v] = max(t[2 * v], t[2 * v + 1]);
  }
}
pair<int, int> getMax(int l, int r, int v, int tl, int tr) {
  if (tl >= l && tr <= r) {
    return t[v];
  }
  if (tl > r || tr < l) return {0, n};
  int tm = (tl + tr) >> 1;
  return max(getMax(l, r, 2 * v, tl, tm), getMax(l, r, 2 * v + 1, tm + 1, tr));
}
void upd(int id, int v, int tl, int tr) {
  if (tl == tr) {
    t[v].first = 0;
    return;
  }
  int tm = (tl + tr) >> 1;
  if (tm >= id)
    upd(id, 2 * v, tl, tm);
  else
    upd(id, 2 * v + 1, tm + 1, tr);
  t[v] = max(t[2 * v], t[2 * v + 1]);
}
pair<int, int> e[N];
bool ex[N];
pair<int, int> qe[N];
signed main() {
  cin.tie(0);
  cout.tie(0);
  ios_base::sync_with_stdio(false);
  cin >> n >> m >> q;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  for (int i = 0; i < m; i++) {
    int v, u;
    cin >> v >> u;
    e[i] = {v, u};
  }
  iota(p, p + N, 0);
  for (int i = 0; i < q; i++) {
    int tp;
    cin >> tp;
    int id;
    cin >> id;
    if (tp == 2) {
      ex[id - 1] = 1;
    }
    qe[i] = {tp, id};
  }
  for (int i = 0; i < m; i++) {
    if (!ex[i]) {
      mg(e[i].first, e[i].second);
    }
  }
  for (int i = q - 1; ~i; --i) {
    if (qe[i].first == 2)
      mg(e[qe[i].second - 1].first, e[qe[i].second - 1].second);
    else {
      qe[i].second = get(qe[i].second);
    }
  }
  for (int i = 1; i <= n; i++) {
    if (get(i) == i) dfs(i, i);
  }
  b_tr(1, 1, n);
  for (int i = 0; i < q; i++) {
    if (qe[i].first == 1) {
      int id = qe[i].second;
      auto w = getMax(tin[id], tout[id], 1, 1, n);
      upd(w.second, 1, 1, n);
      cout << w.first << '\n';
    }
  }
  return 0;
}
