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;
template <class T>
using vc = vector<T>;
template <class T>
using vvc = vc<vc<T>>;
template <class T>
void mkuni(vector<T> &v) {
  sort(v.begin(), v.end());
  v.erase(unique(v.begin(), v.end()), v.end());
}
long long rand_int(long long l, long long r) {
  static mt19937_64 gen(chrono::steady_clock::now().time_since_epoch().count());
  return uniform_int_distribution<long long>(l, r)(gen);
}
template <class T>
void print(T x, int suc = 1) {
  cout << x;
  if (suc == 1)
    cout << '\n';
  else
    cout << ' ';
}
template <class T>
void print(const vector<T> &v, int suc = 1) {
  for (int i = 0; i < v.size(); i++)
    print(v[i], i == (int)(v.size()) - 1 ? suc : 2);
}
const int maxn = 1e6 + 7;
int ed[maxn];
int in[maxn], out[maxn], timer, tot;
int p[maxn];
struct Edge {
  int u, v;
} edge[maxn];
struct Q {
  int tp, x;
};
int fa[maxn];
int Find(int x) { return x == fa[x] ? x : fa[x] = Find(fa[x]); }
vector<int> g[maxn];
void Union(int u, int v) {
  int fu = Find(u), fv = Find(v);
  if (fu == fv) return;
  ++tot;
  fa[fu] = tot;
  fa[fv] = tot;
  g[tot].push_back(fu);
  g[tot].push_back(fv);
}
void dfs(int u, int fa = -1) {
  in[u] = ++timer;
  for (auto &v : g[u]) {
    if (v == fa) continue;
    dfs(v, u);
  }
  out[u] = timer;
}
pair<int, int> mx[maxn << 2];
void pushup(int o) { mx[o] = max(mx[o << 1], mx[o << 1 | 1]); }
void update(int time, int val, int l, int r, int o) {
  if (l == r) {
    mx[o] = {val, time};
    return;
  }
  int mid = l + r >> 1;
  if (time <= mid)
    update(time, val, l, mid, o << 1);
  else
    update(time, val, mid + 1, r, o << 1 | 1);
  pushup(o);
}
pair<int, int> Query(int o, int l, int r, int L, int R) {
  if (L <= l && R >= r) return mx[o];
  int mid = l + r >> 1;
  pair<int, int> ma = {0, 0};
  if (L <= mid) ma = max(ma, Query(o << 1, l, mid, L, R));
  if (R > mid) ma = max(ma, Query(o << 1 | 1, mid + 1, r, L, R));
  return ma;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int n, m, q;
  cin >> n >> m >> q;
  for (int i = 1; i <= n + m + q; i++) fa[i] = i;
  tot = n;
  for (int i = 1; i <= n; ++i) cin >> p[i];
  for (int i = 1; i <= m; ++i) cin >> edge[i].u >> edge[i].v;
  for (int i = 1; i <= m; ++i) ed[i] = q;
  vc<Q> query(q);
  for (int i = 0; i < q; ++i) {
    int tp, x;
    cin >> tp >> x;
    query[i] = {tp, x};
    if (tp == 2) ed[x] = i;
  }
  for (int i = 1; i <= m; ++i)
    if (ed[i] == q) Union(edge[i].u, edge[i].v);
  for (int i = q - 1; i >= 0; --i) {
    int x = query[i].x, tp = query[i].tp;
    if (tp == 2)
      Union(edge[x].u, edge[x].v);
    else
      query[i].x = Find(query[i].x);
  }
  for (int i = 1; i <= tot; ++i)
    if (Find(i) == i) dfs(i);
  for (int i = 1; i <= n; ++i) update(in[i], p[i], 1, tot, 1);
  for (int i = 0; i < q; ++i) {
    if (query[i].tp == 1) {
      int x = query[i].x;
      pair<int, int> p = Query(1, 1, tot, in[x], out[x]);
      print(p.first);
      update(p.second, 0, 1, tot, 1);
    }
  }
}
