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 maxn = 200005;
const int maxm = 300005;
const int maxq = 500005;
int n, m, i, j, t, k, s, q, N, head[maxn << 1], eg[maxm][2], a[maxn],
    fat[maxn << 1], tot, siz[maxn << 1], dfn[maxn << 1], ti, seg[maxn << 3],
    pla[maxn << 3], b[maxn << 1];
bool eg_vis[maxm];
struct Edge {
  int nxt, aim;
} edge[maxn << 1];
inline void add_edge(int x, int y) {
  edge[++N] = (Edge){head[x], y};
  head[x] = N;
}
struct QuestionQuestion {
  int op, v;
} qu[maxq];
int poi[maxq];
int father(int x) { return x == fat[x] ? x : fat[x] = father(fat[x]); }
void dfs(int x) {
  siz[x] = 1;
  dfn[x] = ++ti;
  b[ti] = x;
  for (int i = head[x]; i; i = edge[i].nxt) {
    int des = edge[i].aim;
    dfs(des);
    siz[x] += siz[des];
  }
}
void build(int rt, int l, int r) {
  if (l == r) {
    seg[rt] = (b[r] <= n ? a[b[r]] : 0);
    pla[rt] = r;
    return;
  }
  int mid = (l + r) / 2;
  build(rt << 1, l, mid);
  build(rt << 1 | 1, mid + 1, r);
  seg[rt] = max(seg[rt << 1], seg[rt << 1 | 1]);
  pla[rt] = (seg[rt] == seg[rt << 1] ? pla[rt << 1] : pla[rt << 1 | 1]);
}
void del(int rt, int l, int r, int pl) {
  if (l == r) {
    seg[rt] = 0;
    return;
  }
  int mid = (l + r) / 2;
  if (pl <= mid)
    del(rt << 1, l, mid, pl);
  else
    del(rt << 1 | 1, mid + 1, r, pl);
  seg[rt] = max(seg[rt << 1], seg[rt << 1 | 1]);
  pla[rt] = (seg[rt] == seg[rt << 1] ? pla[rt << 1] : pla[rt << 1 | 1]);
}
pair<int, int> query(int rt, int l, int r, int L, int R) {
  if (l >= L && r <= R) return make_pair(seg[rt], pla[rt]);
  int mid = (l + r) / 2;
  if (R <= mid) return query(rt << 1, l, mid, L, R);
  if (L > mid) return query(rt << 1 | 1, mid + 1, r, L, R);
  return max(query(rt << 1, l, mid, L, R),
             query(rt << 1 | 1, mid + 1, r, L, R));
}
int main() {
  scanf("%d%d%d", &n, &m, &q);
  for (i = 1; i <= n; ++i) scanf("%d", &a[i]);
  for (i = 1; i <= m; ++i) {
    scanf("%d%d", &eg[i][0], &eg[i][1]);
  }
  tot = n;
  for (i = 1; i <= q; ++i) {
    scanf("%d%d", &qu[i].op, &qu[i].v);
    if (qu[i].op == 2) eg_vis[qu[i].v] = 1;
  }
  for (i = 1; i <= (n << 1); ++i) fat[i] = i;
  for (i = 1; i <= m; ++i)
    if (!eg_vis[i]) {
      t = father(eg[i][0]);
      k = father(eg[i][1]);
      if (t != k) fat[t] = k, add_edge(k, t);
    }
  for (i = q; i > 0; --i) {
    if (qu[i].op == 2) {
      t = father(eg[qu[i].v][0]);
      k = father(eg[qu[i].v][1]);
      if (t != k) {
        ++tot;
        fat[t] = fat[k] = tot;
        add_edge(tot, t);
        add_edge(tot, k);
      }
    } else
      poi[i] = father(qu[i].v);
  }
  for (i = 1; i <= tot; ++i)
    if (fat[i] == i) dfs(i);
  build(1, 1, ti);
  for (i = 1; i <= q; ++i) {
    if (qu[i].op == 1) {
      pair<int, int> ret =
          query(1, 1, ti, dfn[poi[i]], dfn[poi[i]] + siz[poi[i]] - 1);
      printf("%d\n", ret.first);
      del(1, 1, ti, ret.second);
    }
  }
  return 0;
}
