#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;
}
