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;
const int N = 2e5 + 1;
const int M = 3e5 + 1;
const int Q = 5e5 + 1;
vector<int> adj[2 * N];
int in[2 * N], out[2 * N], tym, a[N], p[2 * N];
int typ[Q], id[Q], vert[Q], l[M], r[M], n, m, q, nd, del[M];
pair<int, int> t[N << 2];
void update(int node, int l, int r, int i, int x) {
  if (l == r) {
    t[node] = {x, i};
    return;
  }
  int m = l + r >> 1;
  if (i <= m)
    update(node << 1, l, m, i, x);
  else
    update(node << 1 | 1, m + 1, r, i, x);
  t[node] = max(t[node << 1], t[node << 1 | 1]);
}
pair<int, int> query(int node, int l, int r, int i, int j) {
  if (r < i || l > j) return {0, 0};
  if (i <= l && r <= j) return t[node];
  int m = l + r >> 1;
  return max(query(node << 1, l, m, i, j),
             query(node << 1 | 1, m + 1, r, i, j));
}
void dfs(int u) {
  if (adj[u].size() == 0) {
    in[u] = out[u] = ++tym;
    return;
  }
  in[u] = 1e9, out[u] = 0;
  for (int v : adj[u]) {
    dfs(v);
    in[u] = min(in[u], in[v]);
    out[u] = max(out[u], out[v]);
  }
}
int find(int u) { return u == p[u] ? u : p[u] = find(p[u]); }
void Union(int u, int v) {
  u = find(u);
  v = find(v);
  if (u == v) return;
  ++nd;
  p[u] = p[v] = nd;
  adj[nd].push_back(u);
  adj[nd].push_back(v);
}
int main() {
  scanf("%d %d %d", &n, &m, &q);
  for (int i = 1; i <= n; ++i) scanf("%d", &a[i]);
  for (int i = 1; i <= m; ++i) scanf("%d %d", &l[i], &r[i]);
  for (int i = 1; i <= q; ++i) {
    scanf("%d %d", &typ[i], &id[i]);
    if (typ[i] == 2) {
      del[id[i]] = 1;
    }
  }
  iota(p, p + 2 * N, 0);
  nd = n;
  for (int i = 1; i <= m; ++i)
    if (!del[i]) Union(l[i], r[i]);
  for (int i = q; i >= 1; --i) {
    if (typ[i] == 1) {
      vert[i] = find(id[i]);
    } else {
      Union(l[id[i]], r[id[i]]);
    }
  }
  for (int i = 1; i <= nd; ++i)
    if (find(i) == i) dfs(i);
  for (int i = 1; i <= n; ++i) update(1, 1, n, in[i], a[i]);
  for (int i = 1; i <= q; ++i) {
    if (typ[i] == 1) {
      pair<int, int> X = query(1, 1, n, in[vert[i]], out[vert[i]]);
      printf("%d\n", X.first);
      update(1, 1, n, X.second, 0);
    }
  }
  return 0;
}
