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 Max_N = 2e5, Max_M = 3e5, Max_Q = 5e5;
int n, m, q, p[Max_N + 5], vis[Max_M + 5], fa[Max_N + 5], size[Max_N + 5],
    Tag[Max_N + 5], L[Max_M + 5], R[Max_M + 5], bln[Max_N + 5], dfn[Max_N + 5];
struct kk {
  int u, v;
} E[Max_M + 5];
struct KK {
  int opt, x;
} Q[Max_Q + 5];
struct Tree {
  int l, r, val;
} A[Max_N * 4 + 5];
inline int Get(int x) { return x == fa[x] ? x : Get(fa[x]); }
inline void Merge(int x, int y) {
  if (Get(x) == Get(y)) return;
  if (size[Get(x)] < size[Get(y)]) swap(x, y);
  Tag[Get(y)] += size[Get(x)];
  size[Get(x)] += size[Get(y)];
  fa[Get(y)] = Get(x);
}
inline int Ask(int x) {
  int sum = 0;
  for (int lst = 0; x != lst; lst = x, x = fa[x]) sum += Tag[x];
  return sum;
}
inline void Build(int x, int l, int r) {
  A[x].l = l;
  A[x].r = r;
  A[x].val = 0;
  if (l == r) {
    A[x].val = bln[l];
    return;
  }
  Build(x << 1, l, (l + r) >> 1);
  Build((x << 1) | 1, ((l + r) >> 1) + 1, r);
  A[x].val = p[A[x << 1].val] > p[A[(x << 1) | 1].val] ? A[x << 1].val
                                                       : A[(x << 1) | 1].val;
}
inline int ASK(int x, int l, int r) {
  if (l <= A[x].l && A[x].r <= r) return A[x].val;
  if (r <= A[x << 1].r) return ASK(x << 1, l, r);
  if (l > A[x << 1].r) return ASK((x << 1) | 1, l, r);
  int ans1 = ASK(x << 1, l, r), ans2 = ((x << 1) | 1, l, r);
  return p[ans1] > p[ans2] ? ans1 : ans2;
}
inline void Add(int x, int k) {
  if (A[x].l == A[x].r) return;
  if (k <= A[x << 1].r)
    Add(x << 1, k);
  else
    Add((x << 1) | 1, k);
  A[x].val = p[A[x << 1].val] > p[A[(x << 1) | 1].val] ? A[x << 1].val
                                                       : A[(x << 1) | 1].val;
}
int main() {
  scanf("%d%d%d", &n, &m, &q);
  for (int i = 1; i <= n; i++) scanf("%d", &p[i]);
  for (int i = 1; i <= m; i++) scanf("%d%d", &E[i].u, &E[i].v);
  for (int i = 1; i <= q; i++) {
    scanf("%d%d", &Q[i].opt, &Q[i].x);
    if (Q[i].opt == 2) ++vis[Q[i].x];
  }
  for (int i = 1; i <= n; i++) fa[i] = i, size[i] = 1;
  for (int i = 1; i <= m; i++)
    if (!vis[i]) Merge(E[i].u, E[i].v);
  for (int i = q; i >= 1; i--) {
    if (Q[i].opt == 1) Q[i].x = Get(Q[i].x), R[i] = size[Q[i].x];
    if (Q[i].opt == 2) {
      --vis[Q[i].x];
      if (!vis[Q[i].x]) Merge(E[Q[i].x].u, E[Q[i].x].v);
    }
  }
  for (int i = 1, sum = 0; i <= n; i++)
    if (Get(i) == i) Tag[i] += sum, sum += size[i];
  for (int i = 1; i <= n; i++) dfn[i] = Ask(i) + 1;
  for (int i = 1; i <= q; i++)
    if (Q[i].opt == 1) L[i] = dfn[Q[i].x], R[i] += dfn[Q[i].x] - 1;
  for (int i = 1; i <= n; i++) bln[dfn[i]] = i;
  Build(1, 1, n);
  for (int i = 1; i <= q; i++) {
    if (Q[i].opt == 1) {
      int x = ASK(1, L[i], R[i]);
      printf("%d\n", p[x]);
      p[x] = 0;
      Add(1, dfn[x]);
    }
  }
  return 0;
}
