#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 10;
const int maxm = 4e5 * 26 + 5;
const int INF = 0x3f3f3f3f;
const long long LINF = 3e17 + 1;
const long long mod = 1e9 + 7;
const int MOD = 1e6 + 7;
inline long long read() {
  register long long x = 0, f = 1;
  char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (isdigit(ch)) {
    x = (x << 3) + (x << 1) + ch - '0';
    ch = getchar();
  }
  return (f == 1) ? x : -x;
}
int n, m, q;
int w[maxn];
struct edge {
  int v, nxt, w;
} E[maxn], p[maxn];
int fa[maxn], dep[maxn], head[maxn], wei[maxn], tim[maxn], id[maxn];
pair<int, int> qs[maxn];
int f[maxn][21], eid;
int dfn[maxn], DFN, nfd[maxn], tr[maxn], ed[maxn], ans[maxn];
void add(int u, int v) {
  E[eid] = {v, head[u]};
  head[u] = eid++;
}
bool cmp(int a, int b) { return tim[a] > tim[b]; }
int fd(int x) { return x == fa[x] ? x : fa[x] = fd(fa[x]); }
void dfs(int u, int ff) {
  dep[u] = dep[ff] + 1;
  dfn[u] = ++DFN;
  nfd[DFN] = u;
  for (int i = head[u]; i != -1; i = E[i].nxt) {
    int v = E[i].v;
    if (v == ff) continue;
    f[v][0] = u;
    dfs(v, u);
  }
  ed[u] = DFN;
}
void pushup(int o) {
  tr[o] =
      w[tr[(o << 1)]] == w[tr[(o << 1 | 1)]]
          ? (tr[(o << 1)] < tr[(o << 1 | 1)] ? tr[(o << 1)] : tr[(o << 1 | 1)])
          : (w[tr[(o << 1)]] > w[tr[(o << 1 | 1)]] ? tr[(o << 1)]
                                                   : tr[(o << 1 | 1)]);
}
void build(int o, int l, int r) {
  if (l == r) {
    tr[o] = nfd[l];
    return;
  }
  int mid = l + r >> 1;
  build((o << 1), l, mid), build((o << 1 | 1), mid + 1, r);
  pushup(o);
}
void upd(int o, int l, int r, int p, int v) {
  if (l == r) {
    tr[o] = v;
    return;
  }
  int mid = l + r >> 1;
  if (p <= mid)
    upd((o << 1), l, mid, p, v);
  else
    upd((o << 1 | 1), mid + 1, r, p, v);
  pushup(o);
}
int qry(int o, int l, int r, int ql, int qr) {
  if (ql <= l && r <= qr) return tr[o];
  int mid = l + r >> 1;
  int res = -1;
  if (ql <= mid) res = qry((o << 1), l, mid, ql, qr);
  if (mid < qr) {
    if (res == -1)
      return qry((o << 1 | 1), mid + 1, r, ql, qr);
    else {
      int tt = qry((o << 1 | 1), mid + 1, r, ql, qr);
      if (tt != -1)
        res = w[res] == w[tt] ? (res < tt ? res : tt)
                              : (w[res] > w[tt] ? res : tt);
    }
  }
  return res;
}
int get(int x, int val) {
  for (int i = 20; i >= 0; i--)
    if (f[x][i] && wei[f[x][i]] >= val) x = f[x][i];
  return x;
}
int main() {
  n = read(), m = read(), q = read();
  for (int i = 1; i <= n; i++) w[i] = read(), wei[i] = q + 1;
  int nn = n << 1;
  for (int i = 1; i <= nn + 5; i++) fa[i] = i, head[i] = -1;
  for (int i = 1; i <= m; i++) {
    p[i].v = read(), p[i].nxt = read();
    tim[i] = q + 1, id[i] = i;
  }
  for (int i = 1; i <= q; i++) {
    ans[i] = -1;
    qs[i].first = read(), qs[i].second = read();
    if (qs[i].first == 2) tim[qs[i].second] = i;
  }
  sort(id + 1, id + 1 + m, cmp);
  int k = n;
  for (int i = 1; i <= m; i++) {
    int u = p[id[i]].v, v = p[id[i]].nxt;
    int uu = fd(u), vv = fd(v);
    if (uu == vv) continue;
    fa[uu] = fa[vv] = ++k;
    wei[k] = tim[id[i]];
    add(uu, k), add(k, uu);
    add(vv, k), add(k, vv);
  }
  for (int i = k; i >= 1; i--)
    if (!dfn[i]) dfs(i, 0);
  for (int j = 1; j <= 20; j++)
    for (int i = 1; i <= k; i++) f[i][j] = f[f[i][j - 1]][j - 1];
  build(1, 1, k);
  for (int i = 1; i <= q; i++) {
    if (qs[i].first == 2) continue;
    int tt = get(qs[i].second, i);
    int res = qry(1, 1, k, dfn[tt], ed[tt]);
    ans[i] = w[res];
    if (w[res]) upd(1, 1, k, dfn[res], 0);
    w[res] = 0;
  }
  for (int i = 1; i <= q; i++) {
    if (ans[i] != -1) printf("%d\n", ans[i]);
  }
  return 0;
}
