#include <bits/stdc++.h>
using namespace std;
inline int rd(int f = 1, int x = 0, char ch = ' ') {
  while (!isdigit(ch = getchar()))
    if (ch == '-') f = -1;
  while (isdigit(ch)) x = x * 10 + ch - '0', ch = getchar();
  return f * x;
}
const int N = 5e5 + 5, L = 20;
int n, m, q, tot, tk, o[N], b[N], t[N << 2], ls[N], rs[N], pos[N], rk[N],
    ac[N][L], w[N], u[N], v[N], a[N], fa[N], lp[N], rp[N], vis[N];
int fd(int x) { return x == fa[x] ? x : fa[x] = fd(fa[x]); }
int chkmax(int x, int y) { return a[x] > a[y] ? x : y; }
void pu(int x) { t[x] = chkmax(t[x << 1], t[x << 1 | 1]); }
void init(int x, int l, int r) {
  if (l == r) return t[x] = rk[l], void();
  int mid = (l + r) >> 1;
  init(x << 1, l, mid), init(x << 1 | 1, mid + 1, r), pu(x);
}
void del(int x, int l, int r, int p) {
  if (l == r) return a[t[x]] = 0, void();
  int mid = (l + r) >> 1;
  if (p <= mid)
    del(x << 1, l, mid, p);
  else
    del(x << 1 | 1, mid + 1, r, p);
  pu(x);
}
int ask(int x, int l, int r, int ql, int qr) {
  if (ql <= l && r <= qr) return t[x];
  int mid = (l + r) >> 1, ret = 0;
  if (ql <= mid) ret = chkmax(ret, ask(x << 1, l, mid, ql, qr));
  if (qr > mid) ret = chkmax(ret, ask(x << 1 | 1, mid + 1, r, ql, qr));
  return ret;
}
void lk(int k, int t) {
  int x = fd(u[k]), y = fd(v[k]);
  if (x == y) return;
  ++tot, w[tot] = t, fa[tot] = fa[x] = fa[y] = tot, ls[tot] = x, rs[tot] = y;
}
void dfs(int x) {
  for (int i = 0; i + 1 < L; ++i) ac[x][i + 1] = ac[ac[x][i]][i];
  if (!ls[x] && !rs[x]) return rk[lp[x] = rp[x] = pos[x] = ++tk] = x, void();
  ac[ls[x]][0] = ac[rs[x]][0] = x, dfs(ls[x]), dfs(rs[x]), lp[x] = lp[ls[x]],
  rp[x] = rp[rs[x]];
}
int get(int x, int t) {
  for (int i = L - 1; ~i; --i)
    if (w[ac[x][i]] > t) x = ac[x][i];
  return x;
}
int main() {
  n = rd(), m = rd(), q = rd(), tot = n;
  for (int i = 1; i <= n; ++i) a[i] = rd(), fa[i] = i, w[i] = q + 1;
  for (int i = 1; i <= m; ++i) u[i] = rd(), v[i] = rd();
  for (int i = 1; i <= q; ++i) o[i] = rd(), b[i] = rd(), vis[b[i]] |= o[i] - 1;
  for (int i = 1; i <= m; ++i)
    if (!vis[i]) lk(i, q + 1);
  for (int i = q; i; --i)
    if (o[i] == 2) lk(b[i], i);
  for (int i = 1; i <= tot; ++i)
    if (fa[i] == i) dfs(i);
  init(1, 1, n), assert(tk == n);
  for (int i = 1; i <= q; ++i)
    if (o[i] == 1) {
      int e = get(b[i], i), k = ask(1, 1, n, lp[e], rp[e]);
      printf("%d\n", a[k]), assert(k), del(1, 1, n, pos[k]);
    }
  return 0;
}
