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 dsu[200005];
int a[200005];
int total;
int lst[200005];
int nxt[200005];
int to[200005];
int idx[200005];
int le[200005], re[200005];
int E;
int tr[1 << 20];
struct {
  int l, r;
} rgs[500005];
struct {
  int typ;
  int v;
} qs[500005];
struct {
  int u;
  int v;
  int del;
} es[300005];
int gdsu(int x) {
  if (dsu[x] == x) return x;
  return dsu[x] = gdsu(dsu[x]);
}
void unite0(int x, int y) {
  x = gdsu(x);
  y = gdsu(y);
  if (x != y) {
    nxt[total] = lst[x];
    to[total] = y;
    lst[x] = total;
    total++;
    dsu[y] = x;
  }
}
void unite1(int x, int y) {
  x = gdsu(x);
  y = gdsu(y);
  if (x != y) {
    dsu[y] = x;
    le[x] = min(le[x], le[y]);
    re[x] = max(re[x], re[y]);
  }
}
void dfs(int u, int &i) {
  for (int p = lst[u]; p >= 0; p = nxt[p]) {
    dfs(to[p], i);
  }
  idx[u] = i++;
}
void update(int p, int x) {
  p += E;
  tr[p] = x;
  for (p >>= 1; p; p >>= 1) tr[p] = max(tr[p << 1], tr[p * 2 + 1]);
}
int query(int l, int r) {
  int best = 0;
  for (l = l + E - 1, r = r + E + 1; l ^ r ^ 1; l >>= 1, r >>= 1) {
    if (~l & 1) best = max(best, tr[l ^ 1]);
    if (r & 1) best = max(best, tr[r ^ 1]);
  }
  return best;
}
int _sel(int p) {
  while (p < E) {
    p *= 2;
    if (tr[p] < tr[p | 1]) {
      p |= 1;
    }
  }
  return p ^ E;
}
int sel(int l, int r, int best) {
  for (l = l + E - 1, r = r + E + 1; l ^ r ^ 1; l >>= 1, r >>= 1) {
    if (~l & 1)
      if (tr[l ^ 1] == best) return _sel(l ^ 1);
    if (r & 1)
      if (tr[r ^ 1] == best) return _sel(r ^ 1);
  }
  abort();
  return 0;
}
int nr;
void solve() {
  int n, m, q;
  cin >> n >> m >> q;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 0; i < m; i++) {
    cin >> es[i].u >> es[i].v;
  }
  for (int i = 0; i < q; i++) {
    cin >> qs[i].typ >> qs[i].v;
    if (qs[i].typ == 2) {
      qs[i].v--;
      es[qs[i].v].del = 1;
    }
  }
  memset(lst, 0xff, sizeof(lst[0]) * (n + 1));
  for (int i = 1; i <= n; i++) dsu[i] = i;
  for (int i = 0; i < m; i++) {
    if (!es[i].del) {
      unite0(es[i].u, es[i].v);
    }
  }
  for (int i = q - 1; i >= 0; i--) {
    if (qs[i].typ == 2) {
      int v = qs[i].v;
      unite0(es[v].u, es[v].v);
    }
  }
  int ii = 1;
  for (int i = 1; i <= n; i++) {
    if (gdsu(i) == i) {
      dfs(i, ii);
    }
  }
  for (E = n + 3; E != (E & (-E)); E += E & (-E))
    ;
  for (int i = 1; i <= n; i++) {
    update(idx[i], a[i]);
  }
  for (int i = 1; i <= n; i++) {
    dsu[i] = i;
    le[i] = re[i] = idx[i];
  }
  for (int i = 0; i < m; i++) {
    if (!es[i].del) {
      unite1(es[i].u, es[i].v);
    }
  }
  for (int i = q - 1; i >= 0; i--) {
    int v = qs[i].v;
    if (qs[i].typ == 2) {
      unite1(es[v].u, es[v].v);
    } else {
      v = gdsu(v);
      rgs[nr].l = le[v];
      rgs[nr].r = re[v];
      nr++;
    }
  }
  while (nr) {
    --nr;
    int l = rgs[nr].l;
    int r = rgs[nr].r;
    int best = query(l, r);
    int ii = sel(l, r, best);
    update(ii, 0);
    cout << best << endl;
  }
}
int main() {
  int T = 1;
  ios::sync_with_stdio(false);
  cin.tie(0);
  while (T--) {
    solve();
  }
  return 0;
}
