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;
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
long long power(long long x, long long p, long long MOD) {
  if (p == 0) return 1 % MOD;
  if (p == 1) return x % MOD;
  long long res = power(x, p / 2, MOD);
  res = (long long)res * res % MOD;
  if (p & 1) res = (long long)res * x % MOD;
  return res;
}
const long long N = 200010;
const long long M = 500005;
struct Query {
  long long type, id;
};
long long no_inv[N], label[N];
long long root(long long u) { return no_inv[u]; }
struct Node;
long long node_ptr = 0;
Node* no;
struct Node {
  vector<long long> m;
  long long child = -1;
  long long poll(long long id) {
    long long res = 0;
    while (!m.empty()) {
      long long u = m.back();
      m.pop_back();
      if (no_inv[u] == id && label[u]) {
        res = label[u];
        label[u] = 0;
        break;
      }
    }
    return res;
  }
  void split() {
    for (long long x : no[child].m) {
      no_inv[x] = child;
    }
  }
};
long long make_node() { return node_ptr++; }
pair<long long, long long> ed[M];
bool deleted[M];
Query qrs[M];
long long ans[M];
vector<long long> adj[N];
bool vis[N];
long long dfs_node;
void dfs(long long u) {
  if (vis[u]) return;
  vis[u] = 1;
  no[dfs_node].m.push_back(u);
  no_inv[u] = dfs_node;
  for (long long v : adj[u]) dfs(v);
}
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  long long n, m, q;
  cin >> n >> m >> q;
  no = new Node[N];
  for (long long i = 0; i < n; i++) {
    cin >> label[i];
  }
  for (long long i = 0; i < m; i++) {
    cin >> ed[i].first >> ed[i].second;
    ed[i].first--, ed[i].second--;
  }
  for (long long i = 0; i < q; i++) {
    cin >> qrs[i].type >> qrs[i].id;
    qrs[i].id--;
    if (qrs[i].type == 2) deleted[qrs[i].id] = true;
  }
  for (long long i = 0; i < m; i++) {
    if (!deleted[i]) {
      adj[ed[i].first].push_back(ed[i].second);
      adj[ed[i].second].push_back(ed[i].first);
    }
  }
  for (long long i = 0; i < n; i++) {
    if (!vis[i]) {
      dfs_node = make_node();
      dfs(i);
    }
  }
  memset(deleted, 0, sizeof deleted);
  for (long long i = q - 1; i >= 0; i--) {
    if (qrs[i].type == 2) {
      pair<long long, long long>& e = ed[qrs[i].id];
      long long a = root(e.first), b = root(e.second);
      if (a != b) {
        long long m_no = make_node();
        if (no[a].m.size() < no[b].m.size()) swap(a, b);
        no[a].child = b;
        copy((no[b].m).begin(), (no[b].m).end(), back_inserter(no[a].m));
        for (long long x : no[b].m) no_inv[x] = a;
        deleted[qrs[i].id] = true;
      }
    }
  }
  for (long long i = 0; i < node_ptr; i++) {
    sort((no[i].m).begin(), (no[i].m).end(),
         [](long long a, long long b) { return label[a] < label[b]; });
  }
  for (long long i = 0; i < q; i++) {
    if (qrs[i].type == 1) {
      long long u = qrs[i].id;
      u = root(u);
      cout << no[u].poll(u) << "\n";
    } else if (deleted[qrs[i].id]) {
      long long u = root(ed[qrs[i].id].first);
      assert(no[u].child != -1);
      no[u].split();
    }
  }
}
