#include <bits/stdc++.h>
#pragma GCC optimize("O2")
using namespace std;
const int N = 1e6 + 10;
const long long mod = 1e9 + 7;
const long long mod2 = 998244353;
const long long inf = 8e18;
const int LOG = 22;
long long pw(long long a, long long b, long long M) {
  return (!b ? 1
             : (b & 1 ? (a * pw(a * a % M, b / 2, M)) % M
                      : pw(a * a % M, b / 2, M)));
}
int n, m, q, ptr, T, A[N], mark[N], par[N], root[N], St[N], Fi[N], node[N];
pair<int, int> E[N], Q[N];
vector<int> adj[N];
int get(int x) { return (x == par[x]) ? x : par[x] = get(par[x]); }
void unify(int v, int u) {
  v = get(v), u = get(u);
  if (v == u) return;
  ptr++;
  adj[ptr].push_back(v);
  adj[ptr].push_back(u);
  par[v] = ptr;
  par[u] = ptr;
}
void dfs(int v) {
  St[v] = ++T;
  node[St[v]] = v;
  for (auto u : adj[v]) {
    dfs(u);
  }
  Fi[v] = T;
}
pair<int, int> seg[N << 2];
void build(int v, int tl, int tr) {
  if (tl == tr) {
    seg[v] = make_pair(A[node[tl]], tl);
    return;
  }
  int mid = (tl + tr) >> 1;
  build(v << 1, tl, mid);
  build(v << 1 | 1, mid + 1, tr);
  seg[v] = max(seg[v << 1], seg[v << 1 | 1]);
}
void U(int v, int tl, int tr, int p) {
  if (p > tr || p < tl) return;
  if (tl == tr) {
    seg[v] = make_pair(0, tl);
    return;
  }
  int mid = (tl + tr) >> 1;
  U(v << 1, tl, mid, p), U(v << 1 | 1, mid + 1, tr, p);
  seg[v] = max(seg[v << 1], seg[v << 1 | 1]);
}
pair<int, int> G(int v, int tl, int tr, int l, int r) {
  if (l > tr || r < tl) return make_pair(0, 1);
  if (l <= tl && tr <= r) {
    return seg[v];
  }
  int mid = (tl + tr) >> 1;
  return max(G(v << 1, tl, mid, l, r), G(v << 1 | 1, mid + 1, tr, l, r));
}
int main() {
  for (int i = 0; i < N; i++) {
    par[i] = i;
  }
  scanf("%d%d%d", &n, &m, &q);
  ptr = n;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &A[i]);
  }
  for (int i = 1; i <= m; i++) {
    scanf("%d%d", &E[i].first, &E[i].second);
  }
  for (int i = 1; i <= q; i++) {
    scanf("%d%d", &Q[i].first, &Q[i].second);
    if (Q[i].first == 2) mark[Q[i].second] = 1;
  }
  for (int i = 1; i <= m; i++) {
    if (mark[i]) continue;
    Q[++q] = make_pair(2, i);
  }
  for (int i = q; i >= 1; i--) {
    if (Q[i].first == 2) {
      int cu = Q[i].second;
      unify(E[cu].first, E[cu].second);
    } else {
      root[i] = get(Q[i].second);
    }
  }
  for (int i = 1; i < N; i++) {
    if (get(i) == i) dfs(i);
  }
  build(1, 1, ptr);
  for (int i = 1; i <= q; i++) {
    if (Q[i].first == 1) {
      pair<int, int> cu = G(1, 1, ptr, St[root[i]], Fi[root[i]]);
      printf("%d\n", cu.first);
      if (cu.first == 0) continue;
      U(1, 1, ptr, cu.second);
    }
  }
  return 0;
}
