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;
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;
  void init(vector<int> &v) {
    at.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();
      if (u == 0 or at[u] != v)
        g[v].pop_back();
      else {
        go = g[v].back();
        g[v].pop_back();
        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();
  }
}
