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 N = 6e5 + 100;
int f[N], ne[N], he[N], t[N], st[N], en[N], pr[N], a[N], u[N], v[N], tp[N],
    nn[N], cur[N], vv[N];
int tot, n, nd;
struct aa {
  int x, v;
} tr[N * 4];
aa mmax(aa x, aa y) {
  if (x.v > y.v) return x;
  return y;
}
int get(int x) {
  if (f[x] == x) return x;
  f[x] = get(f[x]);
  return f[x];
}
void link(int x, int y) {
  tot++;
  ne[tot] = he[x];
  he[x] = tot;
  t[tot] = y;
}
void mer(int x, int y) {
  n++;
  f[n] = n;
  x = get(x);
  y = get(y);
  if (x == y) return;
  f[x] = n;
  f[y] = n;
  link(n, x);
  link(n, y);
}
void dfs(int x) {
  nd++;
  st[x] = nd;
  pr[nd] = x;
  for (int i = he[x]; i; i = ne[i]) dfs(t[i]);
  en[x] = nd;
}
void build(int rt, int l, int r) {
  if (l == r) {
    tr[rt].x = pr[l];
    tr[rt].v = a[pr[l]];
    return;
  }
  int mid = l + r >> 1;
  build(rt << 1, l, mid);
  build(rt << 1 | 1, mid + 1, r);
  tr[rt] = mmax(tr[rt << 1], tr[rt << 1 | 1]);
}
aa query(int rt, int l, int r, int x, int y) {
  if (l >= x && r <= y) return tr[rt];
  int mid = l + r >> 1;
  aa ret;
  ret.v = 0;
  if (x <= mid) ret = mmax(ret, query(rt << 1, l, mid, x, y));
  if (y > mid) ret = mmax(ret, query(rt << 1 | 1, mid + 1, r, x, y));
  return ret;
}
void modify(int rt, int l, int r, int x, aa y) {
  if (l == r) {
    tr[rt] = y;
    return;
  }
  int mid = l + r >> 1;
  if (x <= mid)
    modify(rt << 1, l, mid, x, y);
  else
    modify(rt << 1 | 1, mid + 1, r, x, y);
  tr[rt] = mmax(tr[rt << 1], tr[rt << 1 | 1]);
}
int main() {
  int m, q;
  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", &u[i], &v[i]);
  for (int i = 1; i <= q; i++) {
    scanf("%d%d", &tp[i], &nn[i]);
    if (tp[i] == 2) vv[nn[i]] = 1;
  }
  for (int i = 1; i <= n; i++) f[i] = i;
  for (int i = 1; i <= m; i++)
    if (!vv[i]) mer(u[i], v[i]);
  for (int i = q; i >= 1; i--)
    if (tp[i] == 2)
      mer(u[nn[i]], v[nn[i]]);
    else
      cur[i] = get(nn[i]);
  for (int i = 1; i <= n; i++)
    if (f[i] == i) dfs(i);
  build(1, 1, n);
  for (int i = 1; i <= q; i++) {
    if (tp[i] == 1) {
      aa tmp = query(1, 1, n, st[cur[i]], en[cur[i]]);
      aa x;
      x.x = tmp.x;
      x.v = 0;
      modify(1, 1, n, st[tmp.x], x);
      printf("%d\n", tmp.v);
    }
  }
}
