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 <typename T, typename T1>
T amax(T &a, T1 b) {
  if (b > a) a = b;
  return a;
}
template <typename T, typename T1>
T amin(T &a, T1 b) {
  if (b < a) a = b;
  return a;
}
bool isPrime(long long x) {
  if (x == 1) return false;
  for (long long i = 2; i * i <= x; i++) {
    if (x % i == 0) {
      return false;
    }
  }
  return true;
}
vector<long long> num(100000, -1);
void dfs(map<pair<long long, long long>, vector<pair<long long, long long>>> mp,
         long long sv, long long &maxi, vector<bool> &visited, long long &pos,
         long long &ad, long long &adw, long long &cad, long long &cadw) {
  visited[sv] = 1;
  if (num[sv] > maxi) {
    cad = ad, cadw = adw;
    maxi = num[sv];
    pos = sv;
  }
  auto it = mp.find({sv, num[sv]});
  if (it == mp.end()) {
    return;
  }
  for (long long i = 0; i < it->second.size(); i++) {
    if (!visited[mp[{sv, num[sv]}][i].first]) {
      long long ad = sv, adw = num[ad];
      dfs(mp, mp[{sv, num[sv]}][i].first, maxi, visited, pos, ad, adw, cad,
          cadw);
    }
  }
}
void Chaliye_Shuru_Karte_Hai() {
  long long n, m, q;
  cin >> n >> m >> q;
  vector<pair<long long, long long>> edgeRec;
  for (long long i = 1; i < n + 1; i++) {
    cin >> num[i];
  }
  map<pair<long long, long long>, vector<pair<long long, long long>>> mp;
  for (long long i = 1; i < n + 1; i++) {
    mp[make_pair(i, num[i])];
  }
  for (long long i = 0; i < m; i++) {
    long long a, b;
    cin >> a >> b;
    edgeRec.push_back({a, b});
    mp[{a, num[a]}].push_back({b, num[b]});
    mp[{b, num[b]}].push_back({a, num[a]});
  }
  while (q > 0) {
    long long a, b;
    cin >> a >> b;
    if (a == 1) {
      vector<bool> visited(mp.size() + 1, 0);
      long long pos = 0;
      long long maxi = 0;
      long long ad = 0, adw = 0, cad = b, cadw = num[cad];
      dfs(mp, b, maxi, visited, pos, ad, adw, cad, cadw);
      if (maxi == 0 || pos == 0) {
        cout << 0 << '\n';
        return;
      }
      auto it = mp.find({cad, num[cad]});
      pair<long long, long long> p1 = {pos, num[pos]};
      auto itv = find(it->second.begin(), it->second.end(), p1);
      mp[{pos, 0}] = mp[{pos, num[pos]}];
      num[pos] = 0;
      cout << maxi << '\n';
    } else {
      pair<long long, long long> p1 = {edgeRec[b - 1].first,
                                       num[edgeRec[b - 1].first]};
      pair<long long, long long> p2 = {edgeRec[b - 1].second,
                                       num[edgeRec[b - 1].second]};
      auto it1 = mp.find(p1);
      if (it1 == mp.end()) {
        q--;
        continue;
      }
      auto itV = find(it1->second.begin(), it1->second.end(), p2);
      if (itV == it1->second.end()) {
        q--;
        continue;
      }
      it1->second.erase(itV);
      auto it2 = mp.find(p2);
      if (it2 == mp.end()) {
        q--;
        continue;
      }
      auto itV2 = find(it2->second.begin(), it2->second.end(), p1);
      if (itV2 == it2->second.end()) {
        q--;
        continue;
      }
    }
    q--;
  }
}
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long tc = 1;
  while (tc--) {
    Chaliye_Shuru_Karte_Hai();
  }
}
