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 N = 5e5 + 5;
vector<int> s[N];
int p[N];
void make_set(int v) {
  p[v] = v;
  s[v].push_back(v);
  return;
}
int get_par(int v) {
  if (p[v] == v) {
    return v;
  }
  return p[v] = get_par(p[v]);
}
int merge(int a, int b) {
  a = get_par(a);
  b = get_par(b);
  if (s[a].size() < s[b].size()) {
    swap(a, b);
  }
  p[b] = a;
  for (const auto &it : s[b]) {
    s[a].push_back(it);
  }
  return (s[b].size() > 0 ? s[b][0] : 1488);
}
pair<int, int> tree[N];
int val[N], per[N];
void build(int v, int tl, int tr) {
  if (tl == tr) {
    tree[v] = make_pair(val[per[tl]], tl);
    return;
  }
  int tm = (tl + tr) / 2;
  build(2 * v, tl, tm);
  build(2 * v + 1, tm + 1, tr);
  tree[v] = max(tree[2 * v], tree[2 * v + 1]);
}
void modify(int v, int tl, int tr, int pos) {
  if (tl == tr) {
    tree[v].first = 0;
    return;
  }
  int tm = (tl + tr) / 2;
  if (pos <= tm)
    modify(2 * v, tl, tm, pos);
  else
    modify(2 * v + 1, tm + 1, tr, pos);
  tree[v] = max(tree[2 * v], tree[2 * v + 1]);
}
pair<int, int> get(int v, int tl, int tr, int l, int r) {
  if (tl > r || tr < l) {
    return {-1e9, -1e9};
  }
  if (l <= tl && tr <= r) {
    return tree[v];
  }
  int tm = (tl + tr) / 2;
  return max(get(2 * v, tl, tm, l, r), get(2 * v + 1, tm + 1, tr, l, r));
}
void out(int v, int tl, int tr) {
  if (tl == tr) {
    cout << tree[v].first << ' ';
    return;
  }
  int tm = (tl + tr) / 2;
  out(2 * v, tl, tm);
  out(2 * v + 1, tm + 1, tr);
}
signed main() {
  cin.tie(0);
  cout.tie(0);
  ios_base::sync_with_stdio(0);
  int n, m, q;
  cin >> n >> m >> q;
  for (int i = 0; i < n; ++i) {
    cin >> val[i];
  }
  vector<int> a(m), b(m);
  for (int i = 0; i < m; ++i) {
    cin >> a[i] >> b[i];
    --a[i], --b[i];
  }
  vector<int> t(q), w(q);
  vector<int> used(m);
  for (int i = 0; i < q; ++i) {
    cin >> t[i] >> w[i];
    --w[i];
    if (t[i] == 2) {
      used[w[i]] = 1;
    }
  }
  for (int i = 0; i < n; ++i) {
    make_set(i);
  }
  p[n] = n;
  for (int i = 0; i < m; ++i) {
    if (!used[i]) {
      if (get_par(a[i]) != get_par(b[i])) {
        merge(a[i], b[i]);
      }
    }
  }
  vector<int> c(q, -1);
  for (int i = q - 1; i >= 0; --i) {
    if (t[i] == 2) {
      if (get_par(a[w[i]]) != get_par(b[w[i]])) {
        c[i] = merge(a[w[i]], b[w[i]]);
      }
    }
  }
  vector<int> inv(n);
  set<pair<int, int> > st;
  int lst = 0;
  for (int i = 0; i < n; ++i) {
    if (get_par(i) != get_par(n)) {
      int d = s[get_par(i)].size();
      st.insert(make_pair(lst, lst + d - 1));
      merge(n, i);
      lst += d;
    }
  }
  auto cur = s[get_par(n)];
  for (int i = 0; i < cur.size(); ++i) {
    per[i] = cur[i];
    inv[cur[i]] = i;
  }
  build(1, 0, n - 1);
  for (int i = 0; i < q; ++i) {
    if (t[i] == 2) {
      if (c[i] != -1) {
        auto seg = st.lower_bound(make_pair(inv[c[i]], n));
        --seg;
        auto [l, r] = *seg;
        st.erase(seg);
        int m = inv[c[i]] - 1;
        st.insert(make_pair(l, m));
        st.insert(make_pair(m + 1, r));
      }
    } else {
      auto seg = st.lower_bound(make_pair(inv[w[i]], n));
      --seg;
      auto [l, r] = *seg;
      auto [val, id] = get(1, 0, n - 1, l, r);
      modify(1, 0, n - 1, id);
      cout << val << '\n';
    }
  }
  return 0;
}
