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>
const long double PI = acos(-1);
const int M = 1000000007;
using ll = long long;
using namespace std;
inline int mod(int n, int m = M) {
  int ret = n % m;
  if (ret < 0) ret += m;
  return ret;
}
int exp(int n, int k, int m = M) {
  if (k == 0) return 1;
  if (k == 1) return n;
  int ax = exp(n, k / 2, m);
  ax = mod(ax * ax, m);
  if (k % 2) ax = mod(ax * n, m);
  return ax;
}
int gcd(int a, int b) {
  if (a == 0)
    return b;
  else
    return gcd(b % a, a);
}
vector<pair<int, int> > edges;
vector<bool> deleted(312345, false);
vector<int> g[212345];
vector<pair<int, int> > qs;
int A[212345];
int uf[212345];
vector<pair<int, int> > group[212345];
int when[212345];
vector<bool> vis(212345, false);
int gen_node = 212345;
void init(int n) {
  for (int i = 1; i <= n; i++) {
    uf[i] = i;
    when[i] = 1123456;
    group[i].push_back(pair<int, int>(i, when[i]));
  }
}
int get_with_time(int u, int tm) {
  if (uf[u] == u) return u;
  return tm < when[u] ? get_with_time(uf[u], tm) : u;
}
int get(int u) {
  if (u == uf[u])
    return u;
  else
    return get(uf[u]);
}
int get_ans(int u, int tm) {
  while (group[u].size() > 0 &&
         (A[group[u].back().first] == 0 || group[u].back().second <= tm))
    group[u].pop_back();
  return group[u].size() == 0 ? -1 : group[u].back().first;
}
bool merge(int a, int b, int tm) {
  int x = get(a), y = get(b);
  if (x == y) return false;
  if (group[x].size() < group[y].size()) swap(x, y);
  uf[y] = x;
  when[y] = tm;
  for (pair<int, int> k : group[y]) {
    group[x].push_back(pair<int, int>(k.first, when[y]));
  }
  return true;
}
void solution() {
  int n, m, q;
  cin >> n >> m >> q;
  init(n);
  for (int i = 1; i < n + 1; i += 1) cin >> A[i];
  for (int i = 0; i < m; i += 1) {
    int a, b;
    cin >> a >> b;
    edges.push_back(pair<int, int>(a, b));
  }
  for (int i = 0; i < q; i += 1) {
    int x, y;
    cin >> x >> y;
    qs.push_back(pair<int, int>(x, (x == 2 ? y - 1 : y)));
    if (x == 2) deleted[y - 1] = true;
  }
  for (int i = 0; i < m; i += 1) {
    if (deleted[i]) continue;
    int a = edges[i].first, b = edges[i].second;
    merge(a, b, q + 1);
  }
  for (int i = q - 1; i >= 0; i--) {
    int x = qs[i].first, y = qs[i].second;
    if (x == 1) continue;
    int a = edges[y].first, b = edges[y].second;
    merge(a, b, i);
  }
  for (int i = 1; i <= n; i++) {
    sort(group[i].begin(), group[i].end(),
         [&](const pair<int, int> x, const pair<int, int> y) {
           return A[x.first] < A[y.first];
         });
  }
  for (int i = 0; i < q; i++) {
    int x = qs[i].first, y = qs[i].second;
    if (x == 2) continue;
    int lead = get_with_time(y, i);
    int ans = get_ans(lead, i);
    int prt = (ans == -1 ? 0 : A[ans]);
    if (ans != -1) A[ans] = 0;
    cout << prt << '\n';
  }
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  int t = 1;
  while (t--) solution();
}
