#include <bits/stdc++.h>
using namespace std;
stack<pair<int, int>> ops;
vector<int> uf, score;
vector<set<pair<int, int>>> comps;
int find(int u) { return uf[u] < 0 ? u : find(uf[u]); }
void merge(int u, int v) {
  int pu = find(u), pv = find(v);
  if (pu == pv) return;
  if (uf[pu] > uf[pv]) swap(pu, pv);
  ops.push({pv, uf[pv]});
  for (auto &x : comps[pv]) {
    comps[pu].insert(x);
  }
  uf[pu] += uf[pv];
  uf[pv] = pu;
}
void rollback() {
  pair<int, int> op = ops.top();
  ops.pop();
  if (op.first == -1) return;
  int p = uf[op.first];
  uf[p] -= op.second;
  uf[op.first] = op.second;
  vector<pair<int, int>> items;
  for (auto &x : comps[op.first]) {
    pair<int, int> v = {score[x.second], x.second};
    items.push_back(v);
    comps[p].erase(v);
  }
  comps[op.first].clear();
  for (auto &x : items) {
    comps[op.first].insert(x);
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  int n, m, q;
  cin >> n >> m >> q;
  score.assign(n, 0);
  for (auto &x : score) {
    cin >> x;
  }
  vector<pair<int, int>> edges(m);
  for (auto &x : edges) {
    cin >> x.first >> x.second;
    --x.first, --x.second;
  }
  vector<bool> erased(m);
  vector<pair<int, int>> queries(q);
  for (auto &x : queries) {
    cin >> x.first >> x.second;
    --x.second;
    if (x.first == 2) {
      erased[x.second] = true;
    }
  }
  cerr << "READING WAS GOOD" << endl;
  uf.assign(n, -1);
  comps.assign(n, set<pair<int, int>>());
  for (int i = 0; i < n; ++i) {
    comps[i].insert({score[i], i});
  }
  for (int i = 0; i < m; ++i) {
    pair<int, int> e = edges[i];
    if (!erased[i] && find(e.first) != find(e.second)) {
      merge(e.first, e.second);
    }
  }
  for (int i = q - 1; i >= 0; --i) {
    pair<int, int> x = queries[i];
    if (x.first == 2) {
      pair<int, int> e = edges[x.second];
      if (find(e.first) != find(e.second)) {
        merge(e.first, e.second);
      } else {
        ops.push({-1, -1});
      }
    }
  }
  cerr << "MERGING EVERYTHING WAS GOOD TOO" << endl;
  for (auto &x : queries) {
    if (x.first == 1) {
      int p = find(x.second);
      pair<int, int> v = *comps[p].rbegin();
      cout << v.first << "\n";
      score[v.second] = 0;
      comps[p].erase(v);
      comps[p].insert({0, v.second});
    } else {
      rollback();
    }
  }
}
