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;
long long n, m, q, ar[300005], mr[300005];
vector<long long> vr[300005];
set<long long, greater<long long>> fr[300005];
long long pr[300005], sr[300005], used[300005];
vector<pair<long long, long long>> qr;
pair<long long, long long> er[300005];
void func(long long);
long long fin(long long);
void uni(long long, long long);
int main() {
  scanf("%lld %lld %lld", &n, &m, &q);
  for (int i = 1; i < n + 1; i++) scanf("%lld", &ar[i]);
  for (int i = 1; i < m + 1; i++) {
    long long x, y;
    scanf("%lld %lld", &x, &y);
    er[i] = make_pair(x, y);
  }
  for (int i = 0; i < q; i++) {
    long long ty, idx;
    scanf("%lld %lld", &ty, &idx);
    if (ty == 2) mr[idx] = 1;
    qr.push_back(make_pair(ty, idx));
  }
  for (int i = 1; i < n + 1; i++) {
    pr[i] = i, sr[i] = i, vr[i].push_back(i), fr[i].insert(ar[i]);
  }
  for (int i = 1; i < m + 1; i++) {
    if (!mr[i]) {
      long long a = fin(er[i].first), b = fin(er[i].second);
      uni(a, b);
    }
  }
  func(qr.size() - 1);
}
void func(long long idx) {
  if (idx < 0) return;
  long long ty = qr[idx].first, qq = qr[idx].second;
  long long a, b;
  if (ty == 2) {
    a = er[qq].first, b = er[qq].second;
    a = fin(a), b = fin(b);
    if (sr[b] > sr[a]) swap(a, b);
    uni(a, b);
  }
  func(idx - 1);
  if (ty == 2) {
    if (a != b) {
      for (int i = 0; i < vr[b].size(); i++) {
        long long x = ar[vr[b][i]];
        if (fr[a].find(x) != fr[a].end()) fr[a].erase(fr[a].find(x));
        vr[a].pop_back();
        pr[vr[b][i]] = b;
      }
    }
  } else if (ty == 1) {
    long long pp = fin(qq);
    while (used[*fr[pp].begin()]) {
      fr[pp].erase(fr[pp].begin());
      fr[pp].insert(0);
    }
    used[*fr[pp].begin()] = 1;
    used[0] = 0;
    printf("%lld\n", *fr[pp].begin());
  }
}
long long fin(long long idx) {
  if (pr[idx] == idx) return idx;
  return pr[idx] = fin(pr[idx]);
}
void uni(long long a, long long b) {
  if (a == b) return;
  if (sr[b] > sr[a]) swap(a, b);
  pr[b] = a;
  for (int i = 0; i < vr[b].size(); i++) {
    pr[vr[b][i]] = a;
    vr[a].push_back(vr[b][i]);
    fr[a].insert(ar[vr[b][i]]);
  }
}
