#include <bits/stdc++.h>
using namespace std;
const long long M = 1e9 + 7;
const long long mod = 998244353;
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
long long binpow(long long a, long long b, long long m) {
  long long res = 1;
  while (b > 0) {
    if (b & 1) res = res * a % m;
    a = a * a % m;
    b >>= 1;
  }
  return res;
}
long long gcd(long long a, long long b) { return (b == 0 ? a : gcd(b, a % b)); }
struct dsu {
  struct op {
    int u, l, t;
    op() {}
    op(int u, int l, int t) : u(u), l(l), t(t) {}
  };
  vector<int> pai, tam;
  stack<op> old_pai;
  stack<op> old_tam;
  vector<int> g[200200];
  dsu() {}
  dsu(int n) {
    pai.resize(n);
    tam = pai;
    for (int i = 0; i < n; i++) {
      pai[i] = i;
      tam[i] = 1;
    }
  }
  vector<int> at, deleted;
  void init(vector<int> &v) {
    at.resize(v.size() + 1);
    deleted.resize(v.size() + 1);
    for (int i = 0; i < v.size(); i++) {
      g[i].emplace_back(v[i]);
      at[v[i]] = i;
    }
  }
  int find(int u) {
    if (pai[u] == u) return u;
    return find(pai[u]);
  }
  void merge(int u, int v, int t) {
    int a = find(u);
    int b = find(v);
    if (a == b) return;
    if (tam[a] > tam[b]) swap(a, b);
    old_pai.emplace(a, pai[a], t);
    old_tam.emplace(b, tam[b], t);
    pai[a] = b;
    tam[b] += tam[a];
    for (int &x : g[a]) {
      g[b].push_back(x);
      at[x] = b;
    }
  }
  void query(int v) {
    v = find(v);
    int go = 0;
    while (!g[v].empty()) {
      int u = g[v].back();
      g[v].pop_back();
      if (u == 0 or at[u] != v or deleted[u])
        continue;
      else {
        go = u;
        deleted[u] = 1;
        break;
      }
    }
    cout << go << "\n";
  }
  void rollback(int t) {
    while (!old_pai.empty() && old_pai.top().t >= t) {
      pai[old_pai.top().u] = old_pai.top().l;
      tam[old_tam.top().u] = old_tam.top().l;
      for (int &x : g[old_pai.top().l]) {
        at[x] = old_pai.top().l;
      }
      old_pai.pop();
      old_tam.pop();
    }
  }
};
void solve() {
  int n, m, q;
  cin >> n >> m >> q;
  vector<int> p(n), er(m);
  {
    for (auto &_re : p) cin >> _re;
  };
  vector<pair<int, int> > e(m);
  for (int i = 0; i < m; i++) {
    cin >> e[i].first >> e[i].second;
    e[i].first--;
    e[i].second--;
  }
  vector<pair<int, int> > qs(q);
  for (int i = 0; i < q; i++) {
    cin >> qs[i].first >> qs[i].second;
    qs[i].second--;
    if (qs[i].first == 2) er[qs[i].second] = 1;
  }
  dsu D(n);
  D.init(p);
  for (int i = 0; i < m; i++) {
    if (er[i]) continue;
    D.merge(e[i].first, e[i].second, 0);
  }
  int t = 1;
  for (int i = q - 1; i >= 0; i--) {
    if (qs[i].first == 2) {
      D.merge(e[qs[i].second].first, e[qs[i].second].second, t++);
    }
  }
  for (int i = 0; i < n; i++) sort(D.g[i].begin(), D.g[i].end());
  for (int i = 0; i < q; i++) {
    if (qs[i].first == 1) {
      D.query(qs[i].second);
    } else {
      D.rollback(--t);
    }
  }
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  while (t--) {
    solve();
  }
}
