#include <bits/stdc++.h>
using namespace std;
priority_queue<pair<long long int, long long int>> pq[200005];
vector<long long int> v[200005];
long long int parent[200005];
vector<vector<pair<long long int, long long int>>> changes;
long long int arr[200005];
long long int get_parent(long long int child) {
  if (parent[child] == child)
    return child;
  else {
    changes.back().push_back({child, parent[child]});
    return parent[child] = get_parent(parent[child]);
  }
}
void unite(long long int x, long long int y) {
  changes.push_back({});
  x = get_parent(x);
  y = get_parent(y);
  if (x == y) return;
  if (v[x].size() < v[y].size()) swap(x, y);
  changes.back().push_back({y, parent[y]});
  parent[y] = x;
  for (auto it : v[y]) {
    v[x].push_back(it);
    pq[x].push({arr[it], it});
  }
}
pair<long long int, long long int> edge[300005];
bool present[300005];
pair<long long int, long long int> query[500005];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int TESTS = 1;
  while (TESTS--) {
    long long int n, m, q;
    cin >> n >> m >> q;
    for (long long int i = 1; i <= n; i++) {
      cin >> arr[i];
    }
    for (long long int i = 1; i <= n; i++) {
      parent[i] = i;
      v[i].push_back(i);
      pq[i].push({arr[i], i});
    }
    for (long long int i = 1; i <= m; i++) {
      cin >> edge[i].first >> edge[i].second;
      present[i] = false;
    }
    for (long long int i = 1; i <= q; i++) {
      cin >> query[i].first >> query[i].second;
      if (query[i].first == 2) {
        present[query[i].second] = true;
      }
    }
    for (long long int i = 1; i <= m; i++) {
      if (!present[i]) {
        unite(edge[i].first, edge[i].second);
      }
    }
    for (long long int i = q; i >= 1; i--) {
      if (query[i].first == 2) {
        unite(edge[query[i].second].first, edge[query[i].second].second);
      }
    }
    for (long long int i = 1; i <= q; i++) {
      if (query[i].first == 1) {
        long long int node = query[i].second;
        node = get_parent(node);
        long long int ans = 0;
        while (true) {
          if (pq[node].size() == 0) break;
          pair<long long int, long long int> curr = pq[node].top();
          if (arr[curr.second] == 0 || get_parent(curr.second) != node) {
            pq[node].pop();
            continue;
          }
          ans = arr[curr.second];
          arr[curr.second] = 0;
          break;
        }
        cout << ans << '\n';
      } else {
        vector<pair<long long int, long long int>> revert = changes.back();
        reverse(revert.begin(), revert.end());
        changes.pop_back();
        for (auto it : revert) {
          parent[it.first] = it.second;
        }
      }
    }
  }
  return 0;
}
