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>
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("unroll-loops")
using namespace std;
const long long N = 1e6 + 13;
const long long mod = 1e9 + 7;
const long long inf = 1e18;
const int rx[] = {-1, +1, 0, 0};
const int ry[] = {0, 0, -1, +1};
const long double eps = 0.00001;
int p[N], us[N], pr[N];
vector<pair<int, int> > e, qq;
vector<int> g[N];
int last;
int get(int a) {
  if (pr[a] == a) return a;
  return pr[a] = get(pr[a]);
}
void unite(int a, int b) {
  a = get(a);
  b = get(b);
  if (a == b) return;
  pr[a] = last;
  pr[b] = last;
  pr[last] = last;
  g[last].push_back(a);
  g[last].push_back(b);
  g[a].push_back(last);
  g[b].push_back(last);
  ++last;
}
int timer = 0;
int tin[N], tout[N];
void dfs(int v, int p) {
  tin[v] = timer;
  ++timer;
  for (auto to : g[v]) {
    if (to == p) continue;
    dfs(to, v);
  }
  tout[v] = timer;
}
pair<int, int> t[4 * N];
pair<int, int> mx(int v, int cl, int cr, int l, int r) {
  if (cr < l || cl > r) return {0, -1};
  if (l <= cl && cr <= r) return t[v];
  int mid = (cl + cr) / 2;
  return max(mx(v * 2, cl, mid, l, r), mx(v * 2 + 1, mid + 1, cr, l, r));
}
void upd(int v) {
  t[v].first = 0;
  v /= 2;
  while (v > 0) {
    t[v] = max(t[v * 2], t[v * 2 + 1]);
    v /= 2;
  }
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  srand(time(0));
  int n, m, q;
  cin >> n >> m >> q;
  for (int i = 0; i < n; ++i) {
    cin >> p[i];
    pr[i] = i;
  }
  for (int i = 0; i < m; ++i) {
    int a, b;
    cin >> a >> b;
    --a;
    --b;
    e.push_back({a, b});
  }
  for (int i = 0; i < q; ++i) {
    int a, b;
    cin >> a >> b;
    --b;
    if (a == 2) us[b] = 1;
    qq.push_back({a, b});
  }
  last = n;
  for (int i = 0; i < m; ++i) {
    if (!us[i]) {
      unite(e[i].first, e[i].second);
    }
  }
  vector<int> need;
  for (int i = q - 1; i >= 0; --i) {
    if (qq[i].first == 1) {
      need.push_back(get(qq[i].second));
    } else {
      unite(e[qq[i].second].first, e[qq[i].second].second);
    }
  }
  reverse(need.begin(), need.end());
  for (int i = 0; i < last; ++i) {
    if (get(i) == i) {
      dfs(i, i);
    }
  }
  int h = 0;
  while ((1ll << h) < tout[last - 1]) ++h;
  int st = (1ll << h);
  for (int i = n; i < last; ++i) p[i] = -1;
  for (int i = 0; i < last; ++i) {
    t[tin[i] + st] = {p[i], i};
  }
  for (int i = st - 1; i > 0; --i) {
    t[i] = max(t[i * 2], t[i * 2 + 1]);
  }
  for (auto to : need) {
    pair<int, int> cur = mx(1, 0, st - 1, tin[to], tout[to] - 1);
    upd(tin[cur.second] + st);
    cout << cur.first << '\n';
  }
  return 0;
}
