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 N = (int)2e5 + 100;
set<int> vert[N];
int s[N], p[N];
bool DONE[N];
bool was[N];
set<int>::iterator lst[N];
void make(int v) {
  s[v] = 1, p[v] = v;
  vert[v].insert(-v);
}
int fin(int v) {
  if (p[v] == v) return v;
  return p[v] = fin(p[v]);
}
vector<pair<int, int>> rollback;
void un(int a, int b) {
  a = fin(a), b = fin(b);
  if (a == b) {
    rollback.push_back({-1, -1});
    return;
  }
  if (s[a] < s[b]) swap(a, b);
  rollback.push_back({a, b});
  p[b] = a, s[a] += s[b];
  for (auto u : vert[b]) vert[a].insert(u);
  lst[a] = vert[a].begin();
}
void BACK() {
  assert(!rollback.empty());
  pair<int, int> woo = rollback.back();
  rollback.pop_back();
  if (woo.first == -1) return;
  int a = woo.first, b = woo.second;
  p[b] = b, s[a] -= s[b];
  for (auto u : vert[b]) vert[a].erase(u);
  lst[a] = vert[a].begin();
  was[a] = 0;
}
int ANS(int v) {
  v = fin(v);
  if (!was[v]) {
    lst[v] = vert[v].begin(), was[v] = 1;
  }
  while (lst[v] != vert[v].end()) {
    if (DONE[-(*lst[v])])
      ++lst[v];
    else
      break;
  }
  if (lst[v] == vert[v].end()) {
    return 0;
  }
  int ans = -(*lst[v]);
  DONE[ans] = 1;
  lst[v]++;
  return ans;
}
signed main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int n, m, q;
  cin >> n >> m >> q;
  vector<int> p(n);
  for (auto &i : p) cin >> i;
  vector<pair<int, int>> edges(m);
  vector<bool> del(m);
  for (int i = 0; i < m; ++i) {
    int u, v;
    cin >> u >> v;
    --u, --v;
    u = p[u], v = p[v];
    edges[i] = {u, v};
  }
  vector<pair<int, int>> que;
  for (int i = 0; i < q; ++i) {
    int type;
    cin >> type;
    if (type == 1) {
      int x;
      cin >> x;
      --x, x = p[x];
      que.push_back({1, x});
    } else {
      int id;
      cin >> id;
      --id;
      del[id] = 1;
      que.push_back({2, id});
    }
  }
  for (int i = 1; i <= n; ++i) {
    make(i);
  }
  for (int i = 0; i < m; ++i)
    if (!del[i]) un(edges[i].first, edges[i].second);
  for (int i = q - 1; i >= 0; --i) {
    if (que[i].first == 2)
      un(edges[que[i].second].first, edges[que[i].second].second);
  }
  for (int i = 0; i < q; ++i) {
    if (que[i].first == 1) {
      cout << ANS(que[i].second) << '\n';
    } else {
      BACK();
    }
  }
  return 0;
}
