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>
void min_self(C &a, C b) {
  a = min(a, b);
}
template <class C>
void max_self(C &a, C b) {
  a = max(a, b);
}
const long long MOD = 1000000007;
long long mod(long long n, long long m = MOD) {
  n %= m, n += m, n %= m;
  return n;
}
const int MAXN = 1e5 + 5;
const int LOGN = 21;
const long long INF = 1e14;
int dx[] = {1, 0, -1, 0};
int dy[] = {0, 1, 0, -1};
template <class T1, class T2>
void add(T1 &x, T2 y, long long m = MOD) {
  x += y;
  if (x >= m) x -= m;
}
template <class T1, class T2>
void sub(T1 &x, T2 y, long long m = MOD) {
  x -= y;
  if (x < 0) x += m;
}
struct dsu_save {
  int v, rnkv, u, rnku;
  set<pair<int, int>> weightsu, weightsv;
  dsu_save() {}
  dsu_save(int _v, int _rnkv, set<pair<int, int>> a, int _u, int _rnku,
           set<pair<int, int>> b)
      : v(_v), rnkv(_rnkv), weightsv(a), u(_u), rnku(_rnku), weightsu(b) {}
};
struct dsu_with_rollbacks {
  vector<int> p, rnk;
  vector<set<pair<int, int>>> weights;
  int comps;
  stack<dsu_save> op;
  dsu_with_rollbacks() {}
  dsu_with_rollbacks(int n, vector<int> &a) {
    p.resize(n);
    rnk.resize(n);
    weights.resize(n);
    for (int i = 0; i < n; i++) {
      p[i] = i;
      rnk[i] = 0;
      weights[i] = {make_pair(a[i], i)};
    }
    comps = n;
  }
  int find_set(int v) { return (v == p[v]) ? v : find_set(p[v]); }
  bool unite(int v, int u) {
    v = find_set(v);
    u = find_set(u);
    if (v == u) return false;
    comps--;
    if (rnk[v] > rnk[u]) swap(v, u);
    op.push(dsu_save(v, rnk[v], weights[v], u, rnk[u], weights[u]));
    p[v] = u;
    if (rnk[u] == rnk[v]) rnk[u]++;
    for (auto xx : weights[v]) weights[u].insert(xx);
    return true;
  }
  void rollback() {
    if (op.empty()) return;
    dsu_save x = op.top();
    op.pop();
    comps++;
    p[x.v] = x.v;
    rnk[x.v] = x.rnkv;
    weights[x.v] = x.weightsv;
    p[x.u] = x.u;
    rnk[x.u] = x.rnku;
    weights[x.u] = x.weightsu;
  }
};
struct query {
  int id, type;
  bool united;
  query(int _type, int _id) : id(_id), type(_type) {}
};
vector<query> queries;
vector<array<int, 2>> edge;
vector<int> mark_used;
struct QueryTree {
  vector<vector<query>> t;
  dsu_with_rollbacks dsu;
  int T;
  QueryTree() {}
  QueryTree(int _T, int n, vector<int> &a) : T(_T) {
    dsu = dsu_with_rollbacks(n, a);
    t.resize(4 * T + 4);
  }
  void add_to_tree(int v, int l, int r, int ul, int ur, query &q) {
    if (ul > ur) return;
    if (l == ul && r == ur) {
      t[v].push_back(q);
      return;
    }
    int mid = (l + r) / 2;
    add_to_tree(2 * v, l, mid, ul, min(ur, mid), q);
    add_to_tree(2 * v + 1, mid + 1, r, max(ul, mid + 1), ur, q);
  }
  void add_query(query q, int l, int r) { add_to_tree(1, 0, T - 1, l, r, q); }
  void dfs(int v, int l, int r, vector<int> &ans) {
    for (query &q : t[v]) {
      if (q.type == 2) {
        int ind = q.id;
        q.united = dsu.unite(edge[ind][0], edge[ind][1]);
      }
    }
    if (l == r) {
      if (queries[l].type == 1) {
        int who = queries[l].id;
        int rt = dsu.find_set(who);
        int sz = dsu.weights[rt].size();
        while (sz--) {
          auto mx = *dsu.weights[rt].rbegin();
          int which = mx.second;
          if (mark_used[which]) {
            dsu.weights[rt].erase(mx);
            continue;
          }
          ans[l] = mx.first;
          mark_used[which] = 1;
          break;
        }
      }
    } else {
      int mid = (l + r) / 2;
      dfs(2 * v, l, mid, ans);
      dfs(2 * v + 1, mid + 1, r, ans);
    }
    for (query q : t[v]) {
      if (q.united) {
        dsu.rollback();
      }
    }
  }
  vector<int> solve() {
    vector<int> ans(T);
    dfs(1, 0, T - 1, ans);
    return ans;
  }
};
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, m, q;
  cin >> n >> m >> q;
  mark_used.resize(n);
  vector<int> weight(n);
  for (int i = 0; i < n; i++) cin >> weight[i];
  edge.resize(m);
  for (int i = 0; i < m; i++) {
    cin >> edge[i][0] >> edge[i][1];
    edge[i][0]--;
    edge[i][1]--;
  }
  QueryTree qt(q, n, weight);
  for (int i = 0; i < q; i++) {
    int a, b;
    cin >> a >> b;
    query qq(a, b - 1);
    queries.push_back(qq);
    if (a == 1)
      qt.add_query(qq, i, i);
    else
      qt.add_query(qq, 0, i);
  }
  vector<int> ans = qt.solve();
  for (int i = 0; i < q; i++) {
    if (queries[i].type == 1) cout << ans[i], cout << "\n";
  }
  cerr << "\nTime elapsed: " << 1000 * clock() / CLOCKS_PER_SEC << "ms\n";
  return 0;
}
