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 int64_t INF = 4e18;
struct DSU {
  int64_t n;
  vector<int64_t> p;
  vector<vector<int64_t> > g;
  DSU(int64_t n) : n(n), p(n, -1), g(n) {}
  int64_t find(int64_t c) {
    if (p[c] == -1) return c;
    return p[c] = find(p[c]);
  }
  void uni(int64_t a, int64_t b) {
    a = find(a), b = find(b);
    if (a == b) return;
    p.push_back(-1);
    g.push_back(vector<int64_t>({a, b}));
    p[a] = p[b] = n;
    n++;
  }
};
struct SEG {
  int64_t sz;
  vector<pair<int64_t, int64_t> > a;
  SEG(int64_t n) {
    for (sz = 1; sz < n; sz *= 2)
      ;
    a.resize(2 * sz);
  }
  void update(int64_t i, int64_t first) {
    a[i + sz] = {first, i};
    i += sz;
    for (i /= 2; i; i /= 2) a[i] = max(a[2 * i], a[2 * i + 1]);
  }
  pair<int64_t, int64_t> query(int64_t l, int64_t r) {
    pair<int64_t, int64_t> res = {0, l};
    for (l += sz, r += sz; l <= r; l /= 2, r /= 2) {
      if (l % 2) res = max(res, a[l++]);
      if (r % 2 == 0) res = max(res, a[r--]);
    }
    return res;
  }
};
int64_t n, m, q;
int64_t sz;
vector<int64_t> order;
vector<int64_t> in, out;
int64_t t = 0;
void dfs(int64_t cur, vector<vector<int64_t> >& g) {
  in[cur] = t;
  if (cur < n) {
    out[cur] = ++t;
    order.push_back(cur);
    return;
  }
  for (auto nei : g[cur]) dfs(nei, g);
  out[cur] = t;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin >> n >> m >> q;
  vector<int64_t> arr(n);
  for (int64_t i = 0; i < n; i++) cin >> arr[i];
  vector<pair<int64_t, int64_t> > edge(m);
  vector<bool> del(m);
  for (int64_t i = 0; i < m; i++)
    cin >> edge[i].first >> edge[i].second, edge[i].first--, edge[i].second--;
  vector<int64_t> op(q), val(q);
  for (int64_t i = 0; i < q; i++) {
    cin >> op[i] >> val[i];
    val[i]--;
    if (op[i] == 2) del[val[i]] = 1;
  }
  DSU dsu(n);
  for (int64_t i = 0; i < m; i++)
    if (!del[i]) dsu.uni(edge[i].first, edge[i].second);
  vector<int64_t> qs;
  for (int64_t i = q - 1; i >= 0; i--) {
    if (op[i] == 1)
      qs.push_back(dsu.find(val[i]));
    else
      dsu.uni(edge[val[i]].first, edge[val[i]].second);
  }
  reverse(qs.begin(), qs.end());
  sz = dsu.n;
  in.resize(sz);
  out.resize(sz);
  for (int64_t i = 0; i < sz; i++) {
    if (dsu.p[i] == -1) {
      dfs(i, dsu.g);
    }
  }
  for (auto& first : order) first = arr[first];
  SEG seg(n);
  for (int64_t i = 0; i < n; i++) seg.update(i, order[i]);
  for (auto v : qs) {
    int64_t l = in[v], r = out[v] - 1;
    pair<int64_t, int64_t> res = seg.query(l, r);
    cout << res.first << endl;
    if (res.first) seg.update(res.second, 0);
  }
  return 0;
}
