#include <bits/stdc++.h>
#pragma GCC optimize(2)
using namespace std;
inline int read() {
  int x = 0;
  int f = 0;
  char ch = 0;
  while (!isdigit(ch)) {
    f |= (ch == '-') ? 1 : 0;
    ch = getchar();
  }
  while (isdigit(ch)) {
    x = (x << 3) + (x << 1) + (ch ^ 48);
    ch = getchar();
  }
  return f ? -x : x;
}
const int maxn = 6e5 + 10;
int aa[maxn];
int st1[maxn], st2[maxn];
int del[maxn], f[maxn];
int typ[maxn], key[maxn];
int n, m, q;
int cnt, tim = 0;
int in[maxn], out[maxn];
struct node {
  int to, nxt;
} edge[maxn << 1];
int head[maxn], tot = 0;
pair<int, int> sum[maxn << 2];
inline void add(int u, int v) {
  edge[tot].to = v;
  edge[tot].nxt = head[u];
  head[u] = tot++;
}
inline int fnd(int x) {
  if (x == f[x]) return x;
  return f[x] = fnd(f[x]);
}
inline void link(int u, int v) {
  u = fnd(u);
  v = fnd(v);
  if (u != v) {
    ++cnt;
    f[cnt] = cnt;
    f[u] = f[v] = cnt;
    add(cnt, u);
    add(cnt, v);
  }
}
inline void dfs(int u) {
  in[u] = ++tim;
  for (int i = head[u]; i != -1; i = edge[i].nxt) {
    int v = edge[i].to;
    dfs(v);
  }
  out[u] = tim;
}
inline void update(int rt, int x, int l, int r, pair<int, int> k) {
  if (l > x || r < x) return;
  if (l == r) {
    sum[rt] = k;
    return;
  }
  int mid = (l + r) >> 1;
  update(rt << 1, x, l, mid, k);
  update(rt << 1 | 1, x, mid + 1, r, k);
  sum[rt] = max(sum[rt << 1], sum[rt << 1 | 1]);
}
inline pair<int, int> query(int rt, int l, int r, int al, int ar) {
  if (l > ar || r < al) return make_pair(0, 0);
  if (l <= al && r >= ar) return sum[rt];
  int mid = (al + ar) >> 1;
  return max(query(rt << 1, l, r, al, mid),
             query(rt << 1 | 1, l, r, mid + 1, ar));
}
int main() {
  n = read();
  m = read();
  q = read();
  cnt = n;
  memset(head, -1, sizeof(head));
  for (register int i = 1; i <= n; ++i) aa[i] = read(), f[i] = i;
  for (register int i = 1; i <= m; ++i) {
    int u = read();
    int v = read();
    st1[i] = u;
    st2[i] = v;
  }
  for (register int i = 1; i <= q; ++i) {
    typ[i] = read();
    key[i] = read();
    if (typ[i] == 2) {
      del[key[i]] = 1;
    }
  }
  for (register int i = 1; i <= m; ++i)
    if (!del[i]) {
      link(st1[i], st2[i]);
    }
  for (register int i = q; i >= 1; --i) {
    if (typ[i] == 2) {
      link(st1[key[i]], st2[key[i]]);
    } else
      key[i] = fnd(key[i]);
  }
  for (register int i = 1; i <= cnt; ++i)
    if (fnd(i) == i) dfs(i);
  for (register int i = 1; i <= n; ++i)
    update(1, in[i], 1, cnt, make_pair(aa[i], in[i]));
  for (register int i = 1; i <= q; ++i) {
    if (typ[i] == 1) {
      pair<int, int> tmp = query(1, in[key[i]], out[key[i]], 1, cnt);
      printf("%d\n", tmp.first);
      if (tmp.first) update(1, tmp.second, 1, cnt, make_pair(0, 0));
    }
  }
}
