#include <bits/stdc++.h>
using namespace std;
template <class T>
ostream &operator<<(ostream &os, vector<T> V) {
  os << "[ ";
  for (auto v : V) os << v << " ";
  os << "]";
  return os;
}
template <class T>
ostream &operator<<(ostream &os, set<T> S) {
  os << "{ ";
  for (auto s : S) os << s << " ";
  return os << "}";
}
template <class L, class R>
ostream &operator<<(ostream &os, map<L, R> M) {
  os << "{ ";
  for (auto m : M) os << "(" << m.first << ":" << m.second << ") ";
  return os << "}";
}
template <class L, class R>
ostream &operator<<(ostream &os, pair<L, R> P) {
  return os << "(" << P.first << "," << P.second << ")";
}
const int N = 200005;
int p[N];
int x[N << 1], y[N << 1];
bool removed[N << 1];
vector<pair<int, int>> query;
struct DSU {
  vector<int> a, s;
  vector<pair<int, int>> changes;
  vector<set<int>> elements;
  DSU(int n) {
    a.resize(n + 1);
    s.resize(n + 1);
    elements.resize(n + 1);
    for (int i = 1; i <= n; i++) {
      a[i] = i;
      s[i] = 1;
      elements[i].insert(p[i]);
    }
  }
  int root(int i) {
    while (i != a[i]) i = a[i];
    return i;
  }
  bool merge(int x, int y) {
    int xr = root(x), yr = root(y);
    if (xr == yr) {
      changes.push_back({xr, xr});
      return false;
    }
    if (s[xr] < s[yr]) swap(xr, yr);
    s[xr] += s[yr];
    elements[xr].insert(elements[yr].begin(), elements[yr].end());
    a[yr] = xr;
    changes.push_back({xr, yr});
    return true;
  }
  void rollBack() {
    if (changes.empty()) return;
    pair<int, int> p = changes.back();
    int xr = p.first, yr = p.second;
    changes.pop_back();
    if (xr == yr) return;
    for (auto it = elements[yr].begin(); it != elements[yr].end();) {
      if (elements[xr].find(*it) != elements[xr].end())
        elements[xr].erase(*it), it++;
      else
        it = elements[yr].erase(it);
    }
    a[yr] = yr;
    s[xr] = elements[xr].size();
    s[yr] = elements[yr].size();
  }
  int query(int x) {
    int xr = root(x);
    if (elements[xr].empty()) return 0;
    int ret = *(--elements[xr].end());
    elements[xr].erase(--elements[xr].end());
    s[xr]--;
    return ret;
  }
};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  set<int> s;
  s.erase(5);
  int n, m, q;
  cin >> n >> m >> q;
  for (int i = 1; i < n + 1; i++) cin >> p[i];
  for (int i = 1; i < m + 1; i++) cin >> x[i] >> y[i];
  query.resize(q);
  vector<int> r;
  for (int i = 0; i < q; i++) {
    cin >> query[i].first >> query[i].second;
    if (query[i].first == 2)
      removed[query[i].second] = true, r.push_back(query[i].second);
  }
  DSU d(n);
  for (int i = 1; i < m + 1; i++) {
    if (!removed[i]) d.merge(x[i], y[i]);
  }
  reverse(r.begin(), r.end());
  for (int i = 0; i < r.size(); i++) d.merge(x[r[i]], y[r[i]]);
  for (int i = 0; i < q; i++) {
    if (query[i].first == 1)
      cout << d.query(query[i].second) << '\n';
    else
      d.rollBack();
  }
  return 0;
}
