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 maxn = 500005;
int n, m, q;
int p[maxn], pos[maxn], det[maxn], par[maxn], sz[maxn];
int dp[maxn];
multiset<int> all[maxn];
vector<int> G[maxn];
pair<int, int> E[maxn];
vector<int> edge[4 * maxn + 5], query[4 * maxn + 5];
stack<pair<int, int> > history;
void del(multiset<int>& a, int b) { a.erase(a.find(b)); }
void update_erase(int u) {
  while (u != par[u]) {
    del(all[par[u]], dp[u]);
    u = par[u];
  }
}
void update_insert(int u) {
  while (u != par[u]) {
    all[par[u]].insert(dp[u]);
    dp[par[u]] = *all[par[u]].rbegin();
    u = par[u];
  }
}
int ask(int u) {
  while (u != par[u]) {
    u = par[u];
  }
  int re = dp[u];
  if (dp[u]) {
    u = pos[dp[u]];
    del(all[u], p[u]);
    update_erase(u);
    p[u] = 0;
    all[u].insert(p[u]);
    dp[u] = *all[u].rbegin();
    update_insert(u);
  }
  return re;
}
void rev() {
  pair<int, int> temp = history.top();
  history.pop();
  int p = temp.first, u = temp.second;
  if (p == -1) return;
  del(all[p], dp[u]);
  dp[p] = *all[p].rbegin();
  sz[p] -= sz[u];
  par[u] = u;
}
int find(int x) {
  while (par[x] != x) x = par[x];
  return x;
}
void conn(int x, int y) {
  x = find(x), y = find(y);
  if (x == y) {
    history.push({-1, -1});
  } else {
    if (sz[x] < sz[y]) swap(x, y);
    history.push({x, y});
    all[x].insert(dp[y]);
    dp[x] = *all[x].rbegin();
    sz[x] += sz[y];
    par[y] = x;
  }
}
void add_query(int i, int l, int r, int pos, int u) {
  if (l > pos or pos > r) return;
  if (l == r) {
    query[i].emplace_back(u);
  } else {
    int mid = (l + r) / 2;
    add_query(2 * i, l, mid, pos, u);
    add_query(2 * i + 1, mid + 1, r, pos, u);
  }
}
void add_edge(int i, int l, int r, int ll, int rr, int e) {
  if (ll > r or l > rr) return;
  if (ll <= l and r <= rr) {
    edge[i].emplace_back(e);
  } else {
    int mid = (l + r) / 2;
    add_edge(2 * i, l, mid, ll, rr, e);
    add_edge(2 * i + 1, mid + 1, r, ll, rr, e);
  }
}
void dfs(int i, int l, int r) {
  for (auto e : edge[i]) {
    conn(E[e].first, E[e].second);
  }
  if (l == r) {
    for (auto u : query[i]) {
      int t = ask(u);
      cout << t << endl;
    }
  } else {
    int mid = (l + r) / 2;
    dfs(2 * i, l, mid);
    dfs(2 * i + 1, mid + 1, r);
  }
  for (auto e : edge[i]) {
    rev();
  }
}
void prep() {
  for (int i = 1; i <= n; i++) {
    par[i] = i;
    sz[i] = 1;
    all[i].insert(p[i]);
    dp[i] = *all[i].rbegin();
  }
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> n >> m >> q;
  for (int i = 1; i <= n; i++) {
    cin >> p[i];
    pos[p[i]] = i;
  }
  prep();
  for (int i = 1; i <= m; i++) {
    int u, v;
    cin >> u >> v;
    G[u].emplace_back(v);
    G[v].emplace_back(u);
    E[i] = {u, v};
  }
  for (int i = 1; i <= q; i++) {
    int t, u;
    cin >> t >> u;
    if (t == 1)
      add_query(1, 1, q, i, u);
    else
      det[u] = i - 1;
  }
  for (int i = 1; i <= m; i++) {
    if (!det[i]) det[i] = q;
    if (det[i] >= 1) add_edge(1, 1, q, 1, det[i], i);
  }
  dfs(1, 1, q);
}
