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;
using ll = long long;
using vi = vector<int>;
using vl = vector<long long>;
using pii = pair<int, int>;
using vpii = vector<pair<int, int>>;
template <class T>
inline bool ckmin(T& a, T b) {
  return b < a ? a = b, 1 : 0;
}
template <class T>
inline bool ckmax(T& a, T b) {
  return b > a ? a = b, 1 : 0;
}
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
const char nl = '\n';
const int mxN = 2e3 + 10;
const int MOD = 1e9 + 7;
const long long infLL = 1e18;
int n, m, q, p[mxN];
set<int> adj[mxN];
vpii e;
bool vis[mxN];
int mx = 0, pos = 0;
void dfs(int u) {
  vis[u] = 1;
  if (ckmax(mx, p[u])) pos = u;
  for (auto& x : adj[u]) {
    if (!vis[x]) dfs(x);
  }
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> m >> q;
  for (int i = (0); i < (n); i++) cin >> p[i];
  for (int i = (0); i < (m); i++) {
    int a, b;
    cin >> a >> b;
    a--;
    b--;
    e.push_back({a, b});
    adj[a].insert(b);
    adj[b].insert(a);
  }
  for (int i = (0); i < (q); i++) {
    int t;
    cin >> t;
    if (t == 1) {
      int x;
      cin >> x;
      x--;
      dfs(x);
      cout << mx << nl;
      p[pos] = 0;
      mx = 0;
      pos = 0;
      memset(vis, 0, sizeof(vis));
    } else {
      int x;
      cin >> x;
      x--;
      adj[e[x].first].erase(e[x].second);
      adj[e[x].second].erase(e[x].first);
    }
  }
  return 0;
}
