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 n, m, q, tte, tot, cnt;
int point[800005], nxt[800005], head[400004], fa[400004];
int vis[400004], dfn[400004], id[400004], ed[400004], a[400004];
int ty[500005], b[500005], idn[400005], qq[500005];
int t[8000005];
struct node {
  int x, y;
} e[300005];
void addedge(int x, int y) {
  point[++tte] = y, nxt[tte] = head[x], head[x] = tte;
  point[++tte] = x, nxt[tte] = head[y], head[y] = tte;
}
int getfa(int x) { return fa[x] == x ? x : fa[x] = getfa(fa[x]); }
void merge(int x, int y) {
  x = getfa(x), y = getfa(y);
  if (x != y) {
    tot++;
    addedge(tot, x);
    addedge(tot, y);
    fa[x] = tot, fa[y] = tot;
    fa[tot] = tot;
  }
}
void dfs(int x, int fa) {
  dfn[x] = ++cnt;
  idn[cnt] = x;
  for (int i = head[x]; i; i = nxt[i]) {
    int y = point[i];
    if (y == fa) continue;
    dfs(y, x);
  }
  ed[x] = cnt;
}
void build(int x, int l, int r) {
  if (l == r) {
    t[x] = a[idn[l]];
    return;
  }
  int mid = (l + r) >> 1;
  build(x << 1, l, mid);
  build(x << 1 | 1, mid + 1, r);
  t[x] = max(t[x << 1], t[x << 1 | 1]);
}
int query(int x, int l, int r, int ll, int rr) {
  if (l > rr || r < ll) return 0;
  if (l >= ll && r <= rr) return t[x];
  int mid = (l + r) >> 1;
  return max(query(x << 1, l, mid, ll, rr),
             query(x << 1 | 1, mid + 1, r, ll, rr));
}
void del(int x, int l, int r, int pos) {
  if (pos < l || pos > r) return;
  if (l == r) {
    t[x] = 0;
    return;
  }
  int mid = (l + r) >> 1;
  del(x << 1, l, mid, pos);
  del(x << 1 | 1, mid + 1, r, pos);
  t[x] = max(t[x << 1], t[x << 1 | 1]);
}
int main() {
  scanf("%d%d%d", &n, &m, &q);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]), id[a[i]] = i;
  for (int i = 1; i <= m; i++) scanf("%d%d", &e[i].x, &e[i].y);
  for (int i = 1; i <= q; i++) {
    scanf("%d%d", &ty[i], &b[i]);
    if (ty[i] == 2) vis[b[i]] = 1;
  }
  tot = n;
  for (int i = 1; i <= n; i++) fa[i] = i;
  for (int i = 1; i <= n; i++)
    if (!vis[i]) merge(e[i].x, e[i].y);
  for (int i = q; i >= 1; i--) {
    if (ty[i] == 1) {
      qq[i] = getfa(b[i]);
    } else
      merge(e[b[i]].x, e[b[i]].y);
  }
  for (int i = 1; i <= tot; i++)
    if (fa[i] == i) dfs(i, 0);
  build(1, 1, tot);
  for (int i = 1; i <= q; i++) {
    if (ty[i] == 2) continue;
    int val = query(1, 1, tot, dfn[qq[i]], ed[qq[i]]);
    printf("%d\n", val);
    del(1, 1, tot, dfn[id[val]]);
  }
  return 0;
}
