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;
struct seg_tree {
  struct node {
    int midx;
    int mval;
  };
  node join(const node& a, const node& b) {
    if (a.mval > b.mval) {
      return a;
    } else
      return b;
  }
  vector<node> items;
  int sz;
  seg_tree(int n) {
    sz = 1;
    while (sz < n) sz <<= 1;
    items.resize(2 * sz - 1);
  }
  void build_up() {
    for (int i = sz - 2; i >= 0; i--)
      items[i] = join(items[2 * i + 1], items[2 * i + 2]);
  }
  void set(int idx, int v) {
    idx += sz - 1;
    items[idx].mval = v;
    while (idx > 0) {
      idx = (idx - 1) / 2;
      items[idx] = join(items[2 * idx + 1], items[2 * idx + 2]);
    }
  }
  node query_int(int idx, int cl, int cr, int l, int r) {
    if (cl + 1 == cr) return items[idx];
    int mid = (cl + cr) / 2;
    if (mid < l) return query_int(2 * idx + 2, mid, cr, l, r);
    if (mid >= r) return query_int(2 * idx + 1, cl, mid, l, r);
    return join(query_int(2 * idx + 1, cl, mid, l, r),
                query_int(2 * idx + 2, mid, cr, l, r));
  }
  node query(int l, int r) { return query_int(0, 0, sz, l, r); }
};
int main() {
  ios::sync_with_stdio(false);
  int n, m, q;
  cin >> n >> m >> q;
  vector<int> p(n);
  for (int i = 0; i < n; i++) cin >> p[i];
  vector<array<int, 2>> e(m);
  for (int i = 0; i < m; i++) {
    cin >> e[i][0] >> e[i][1];
    e[i][0]--;
    e[i][1]--;
  }
  vector<bool> deleted(m);
  vector<array<int, 3>> queries(q);
  for (int i = 0; i < q; i++) {
    cin >> queries[i][0] >> queries[i][1];
    queries[i][1]--;
    if (queries[i][0] != 1) {
      deleted[queries[i][1]] = true;
    }
  }
  vector<int> djs(2 * n - 1, -1);
  function<int(int)> get = [&](int v) {
    if (djs[v] < 0)
      return v;
    else
      return djs[v] = get(djs[v]);
  };
  vector<vector<int>> g(2 * n - 1);
  int cnt = n;
  for (int i = 0; i < m; i++) {
    if (!deleted[i]) {
      int r1 = get(e[i][0]);
      int r2 = get(e[i][1]);
      if (r1 != r2) {
        djs[r2] = cnt;
        djs[r1] = cnt;
        g[cnt].push_back(r1);
        g[cnt].push_back(r2);
        cnt++;
      }
    }
  }
  for (int i = q - 1; i >= 0; i--) {
    int x = queries[i][1];
    if (queries[i][0] == 1) {
      queries[i][2] = get(x);
    } else {
      int r1 = get(e[x][0]);
      int r2 = get(e[x][1]);
      if (r1 != r2) {
        djs[r2] = cnt;
        djs[r1] = cnt;
        g[cnt].push_back(r1);
        g[cnt].push_back(r2);
        cnt++;
      }
    }
  }
  vector<int> stslot(cnt);
  vector<int> left(cnt, -1);
  vector<int> right(cnt);
  int id = 0;
  function<void(int)> dfs = [&](int v) {
    left[v] = id;
    if (g[v].size() == 0) {
      stslot[v] = id++;
    } else {
      for (auto w : g[v]) {
        dfs(w);
      }
    }
    right[v] = id;
  };
  for (int i = cnt - 1; i >= 0; i--)
    if (left[i] < 0) dfs(i);
  seg_tree st(n);
  for (int i = 0; i < n; i++) {
    st.items[st.sz - 1 + stslot[i]] = {stslot[i], p[i]};
  }
  st.build_up();
  vector<int> res;
  for (int i = 0; i < q; i++) {
    if (queries[i][0] == 1) {
      int x = queries[i][2];
      auto res = st.query(left[x], right[x]);
      cout << res.mval << "\n";
      st.set(res.midx, 0);
    }
  }
  return 0;
}
