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;
void canhazfast() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
}
template <typename T>
T gcd(T a, T b) {
  return b ? gcd(b, a % b) : a;
}
template <typename T>
T extgcd(T a, T b, T &x, T &y) {
  T x0 = 1, y0 = 0, x1 = 0, y1 = 1;
  while (b) {
    T q = a / b;
    a %= b;
    swap(a, b);
    x0 -= q * x1;
    swap(x0, x1);
    y0 -= q * y1;
    swap(y0, y1);
  }
  x = x0;
  y = y0;
  return a;
}
int ctz(unsigned x) { return __builtin_ctz(x); }
int ctzll(unsigned long long x) { return __builtin_ctzll(x); }
int clz(unsigned x) { return __builtin_clz(x); }
int clzll(unsigned long long x) { return __builtin_clzll(x); }
int popcnt(unsigned x) { return __builtin_popcount(x); }
int popcntll(unsigned long long x) { return __builtin_popcountll(x); }
int bsr(unsigned x) { return 31 ^ clz(x); }
int bsrll(unsigned long long x) { return 63 ^ clzll(x); }
bool evis[300016];
pair<int, int> e[300016];
set<int> cc[200016];
int p[200016], id[200016];
int t[500016], x[500016];
void join(int i) {
  int a, b;
  tie(a, b) = e[i];
  a = id[a];
  b = id[b];
  if (cc[a].size() < cc[b].size()) swap(a, b);
  e[i] = {a, b};
  if (a == b) return;
  for (int v : cc[b]) {
    cc[a].insert(v);
    id[v] = a;
  }
}
void split(int i) {
  int a, b;
  tie(a, b) = e[i];
  if (a == b) return;
  for (auto it = cc[b].begin(); it != cc[b].end();) {
    int v = *it;
    if (cc[a].count(v)) {
      cc[a].erase(v);
      ++it;
    } else {
      it = cc[b].erase(it);
    }
    id[v] = b;
  }
}
int main() {
  canhazfast();
  int n, m, q;
  cin >> n >> m >> q;
  for (int i = 1; i <= n; ++i) cin >> p[i];
  for (int i = 1; i <= m; ++i) {
    int a, b;
    cin >> a >> b;
    e[i] = {p[a], p[b]};
  }
  for (int i = 0; i < q; ++i) {
    cin >> t[i] >> x[i];
    if (t[i] == 2)
      evis[x[i]] = true;
    else
      x[i] = p[x[i]];
  }
  iota(id + 1, id + 1 + n, 1);
  for (int i = 1; i <= n; ++i) cc[i].insert(i);
  for (int i = 1; i <= m; ++i) {
    if (!evis[i]) join(i);
  }
  for (int i = q - 1; i >= 0; --i) {
    if (t[i] == 2) join(x[i]);
  }
  for (int i = 0; i < q; ++i) {
    if (t[i] == 1) {
      int u = id[x[i]];
      if (cc[u].empty()) {
        cout << "0\n";
        continue;
      }
      auto it = prev(cc[u].end());
      cout << *it << '\n';
      cc[u].erase(it);
    } else {
      split(x[i]);
    }
  }
  return 0;
}
