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 std::max;
using std::min;
using std::sort;
using std::swap;
const int maxn = 500007;
const int maxm = 500007;
const int J = 19;
struct E {
  int u, v;
};
struct Graph {
  E e[maxm];
  int first[maxn], nt[maxm], ES;
  inline void addE(int u, int v) {
    e[++ES] = (E){u, v};
    nt[ES] = first[u];
    first[u] = ES;
    return;
  }
} G, T;
bool book[maxm];
int N, M, Q, cnt;
int fa[J + 1][maxn];
int t[maxn], dfn[maxn], ix, anti[maxn], sz[maxn];
int S[maxn];
int f(int x) { return S[x] == x ? x : S[x] = f(S[x]); }
int A[maxn];
int op[maxn][2];
void dfs(int u) {
  sz[u] = 1;
  anti[dfn[u] = ++ix] = u;
  book[u] = true;
  for (int v, i = T.first[u]; i; i = T.nt[i]) {
    v = T.e[i].v;
    if (v == fa[0][u]) continue;
    dfs(v);
    sz[u] += sz[v];
  }
  return;
}
int mx[maxn << 2];
void com(int &a, int x, int y) {
  if (A[x] < A[y])
    a = y;
  else
    a = x;
  return;
}
void build(int L, int R, int i) {
  if (L == R) {
    mx[i] = anti[L];
    return;
  }
  int mid = L + R >> 1;
  build(L, mid, (i << 1));
  build(mid + 1, R, (i << 1 | 1));
  com(mx[i], mx[(i << 1)], mx[(i << 1 | 1)]);
  return;
}
int query(int L, int R, int l, int r, int i) {
  if (l <= L && R <= r) return mx[i];
  int mid = L + R >> 1;
  int re = 0;
  if (l <= mid) com(re, re, query(L, mid, l, r, (i << 1)));
  if (r > mid) com(re, re, query(mid + 1, R, l, r, (i << 1 | 1)));
  return re;
}
void update(int L, int R, int x, int i) {
  if (L == R) {
    A[anti[x]] = 0;
    return;
  }
  int mid = L + R >> 1;
  if (x <= mid)
    update(L, mid, x, (i << 1));
  else
    update(mid + 1, R, x, (i << 1 | 1));
  com(mx[i], mx[(i << 1)], mx[(i << 1 | 1)]);
  return;
}
int main() {
  scanf("%d%d%d", &N, &M, &Q);
  int u, v;
  for (int i = 1; i <= N; i++) scanf("%d", &A[i]), S[i] = i;
  for (int i = 1; i <= M; i++) scanf("%d%d", &u, &v), G.addE(u, v);
  cnt = N;
  for (int i = 1; i <= Q; i++) {
    scanf("%d%d", &op[i][0], &op[i][1]);
    if (op[i][0] == 2) book[op[i][1]] = 1;
  }
  int tQ = Q;
  for (int i = 1; i <= M; i++)
    if (!book[i]) op[++Q][0] = 2, op[Q][1] = i;
  memset(book, 0, sizeof(book));
  for (int i = Q; i > 0; i--) {
    if (op[i][0] & 1) continue;
    u = f(G.e[op[i][1]].u);
    v = f(G.e[op[i][1]].v);
    if (u == v) continue;
    ++cnt;
    S[cnt] = S[u] = S[v] = cnt;
    fa[0][u] = fa[0][v] = cnt;
    if (i <= tQ)
      t[cnt] = i;
    else
      t[cnt] = 0;
    T.addE(cnt, u);
    T.addE(cnt, v);
  }
  for (int i = cnt; i > 0; i--)
    if (!book[i]) dfs(i);
  build(1, cnt, 1);
  for (int k = 1; k <= J; k++)
    for (int i = 1; i <= cnt; i++) fa[k][i] = fa[k - 1][fa[k - 1][i]];
  for (int i = 1; i <= Q; i++) {
    if (op[i][0] == 2) continue;
    u = op[i][1];
    for (int k = J; k >= 0; k--)
      if (t[fa[k][u]] >= i) u = fa[k][u];
    printf("%d\n", A[u = query(1, cnt, dfn[u], dfn[u] + sz[u] - 1, 1)]);
    update(1, cnt, dfn[u], 1);
  }
  return 0;
}
