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;
int u[300005], v[300005];
bool life[300005], gg[1000005];
int p[200005], fp[200005];
int qs[500005][3];
int root[1000005];
int fa[1000005][22], cnt;
int ask[1000005], cnts, pre[1000005], tops[1000005];
int son[1000005][2];
int findr(int x) {
  if (root[x] == x)
    return x;
  else
    return root[x] = findr(root[x]);
}
void dfs(int x) {
  for (int i = 1; i <= 20; i++) fa[x][i] = fa[fa[x][i - 1]][i - 1];
  if (son[x][0]) {
    fa[son[x][0]][0] = x;
    dfs(son[x][0]);
  }
  if (son[x][1]) {
    fa[son[x][1]][0] = x;
    dfs(son[x][1]);
  }
}
void del(int x) {
  if (tops[x] == 0) {
    gg[x] = 1;
    if (son[x][0]) del(son[x][0]);
    if (son[x][1]) del(son[x][1]);
  }
}
int findd(int x) {
  if (gg[x]) return 0;
  for (int i = 20; i >= 0; i--) {
    if (!gg[fa[x][i]]) x = fa[x][i];
  }
  return x;
}
int main() {
  int n, m, q, x, y;
  scanf("%d%d%d", &n, &m, &q);
  cnt = n;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &p[i]);
    fp[p[i]] = i;
    root[i] = i;
  }
  for (int i = 1; i <= m; i++) scanf("%d%d", &u[i], &v[i]);
  for (int i = 1; i <= q; i++) {
    scanf("%d%d", &qs[i][0], &qs[i][1]);
    if (qs[i][0] == 2) life[qs[i][1]] = 1;
  }
  for (int i = 1; i <= m; i++) {
    if (!life[i]) {
      x = findr(u[i]);
      y = findr(v[i]);
      if (x != y) {
        cnt++;
        root[x] = root[y] = root[cnt] = cnt;
        son[cnt][0] = x;
        son[cnt][1] = y;
      }
    }
  }
  for (int i = q; i >= 1; i--) {
    if (qs[i][0] == 1) {
      x = findr(qs[i][1]);
      cnts++;
      ask[cnts] = i;
      pre[cnts] = tops[x];
      tops[x] = cnts;
    } else {
      x = findr(u[qs[i][1]]);
      y = findr(v[qs[i][1]]);
      if (x != y) {
        cnt++;
        root[x] = root[y] = root[cnt] = cnt;
        son[cnt][0] = x;
        son[cnt][1] = y;
      }
    }
  }
  for (int i = cnt; i >= 1; i--) {
    if (root[i] == i) {
      dfs(i);
      del(i);
    }
  }
  gg[0] = 1;
  for (int i = n; i >= 1; i--) {
    x = findd(fp[i]);
    if (x) {
      qs[ask[tops[x]]][2] = i;
      tops[x] = pre[tops[x]];
      del(x);
    }
  }
  for (int i = 1; i <= q; i++) {
    if (qs[i][0] == 1) printf("%d\n", qs[i][2]);
  }
  return 0;
}
