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 <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 long long N = 200005;
long long p[N];
long long x[N], y[N];
bool removed[N << 1];
vector<pair<long long, long long>> query;
struct DSU {
  vector<long long> a, s;
  vector<pair<long long, long long>> changes;
  vector<set<long long>> elements;
  DSU(long long 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]);
    }
  }
  long long root(long long i) {
    while (i != a[a[i]]) {
      a[i] = a[a[i]];
      i = a[i];
    }
    return i;
  }
  bool merge(long long x, long long y) {
    long long 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<long long, long long> p = changes.back();
    long long xr = p.first, yr = p.second;
    changes.pop_back();
    if (xr == yr) return;
    vector<long long> v;
    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();
  }
  long long query(long long x) {
    long long xr = root(x);
    if (elements[xr].empty()) return 0;
    long long ret = *(--elements[xr].end());
    elements[xr].erase(--elements[xr].end());
    return ret;
  }
};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  set<long long> s;
  s.erase(5);
  long long n, m, q;
  cin >> n >> m >> q;
  for (long long i = 1; i < n + 1; i++) cin >> p[i];
  for (long long i = 1; i < m + 1; i++) cin >> x[i] >> y[i];
  query.resize(q);
  vector<long long> r;
  for (long long 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 (long long i = 1; i < m + 1; i++) {
    if (!removed[i]) d.merge(x[i], y[i]);
  }
  reverse(r.begin(), r.end());
  for (long long i = 0; i < r.size(); i++) d.merge(x[r[i]], y[r[i]]);
  for (long long i = 0; i < q; i++) {
    if (query[i].first == 1)
      cout << d.query(query[i].second) << '\n';
    else
      d.rollBack();
  }
  return 0;
}
