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 = 2e5 + 10, MAXM = 3e5 + 10, MAXQ = 5e5 + 10;
int n, m, q, c[MAXN], st[MAXN], fn[MAXN], S[MAXQ], E[MAXQ], ind[MAXN], p[MAXN];
pair<int, int> edg[MAXM], Q[MAXQ];
vector<int> comp[MAXN], res;
bool en[MAXM];
struct node {
  int mx, l, r;
};
node vs[MAXN * 4];
void upd(int v) {
  if (vs[2 * v + 1].r == 0 || p[vs[2 * v].mx] > p[vs[2 * v + 1].mx])
    vs[v].mx = vs[2 * v].mx;
  else
    vs[v].mx = vs[2 * v + 1].mx;
}
void make(int v, int l, int r) {
  vs[v].l = l, vs[v].r = r;
  if (r - l == 1) {
    vs[v].mx = res[l];
    return;
  }
  int mid = (l + r) / 2;
  make(2 * v, l, mid);
  make(2 * v + 1, mid, r);
  upd(v);
}
int getmx(int v, int ql, int qr) {
  if (vs[v].r <= ql || qr <= vs[v].l) return res[ql];
  if (ql <= vs[v].l && vs[v].r <= qr) return vs[v].mx;
  int a = getmx(2 * v, ql, qr);
  int b = getmx(2 * v + 1, ql, qr);
  if (p[a] > p[b])
    return a;
  else
    return b;
}
void chg(int v, int qi) {
  if (qi < vs[v].l || vs[v].r <= qi) return;
  if (qi == vs[v].l && vs[v].r - vs[v].l == 1) return;
  chg(2 * v, qi);
  chg(2 * v + 1, qi);
  upd(v);
}
void merge(int a, int b) {
  if (comp[a].size() < comp[b].size()) swap(a, b);
  if (a == b) return;
  fn[a] = fn[b];
  for (int i = 0; i < comp[b].size(); i++)
    comp[a].push_back(comp[b][i]), c[comp[b][i]] = a;
  comp[b].clear();
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n >> m >> q;
  for (int i = 1; i <= n; i++)
    cin >> p[i], c[i] = i, comp[i].push_back(i), st[i] = i, fn[i] = i;
  for (int i = 0; i < m; i++) cin >> edg[i].first >> edg[i].second;
  for (int i = 0; i < q; i++) {
    cin >> Q[i].first >> Q[i].second;
    if (Q[i].first == 2) {
      Q[i].second--;
      en[Q[i].second] = true;
    }
  }
  for (int i = 0; i < m; i++)
    if (!en[i]) merge(c[edg[i].first], c[edg[i].second]);
  for (int i = q - 1; i >= 0; i--)
    if (Q[i].first == 2)
      merge(c[edg[Q[i].second].first], c[edg[Q[i].second].second]);
    else
      S[i] = st[c[Q[i].second]], E[i] = fn[c[Q[i].second]];
  for (int i = 1; i <= n; i++)
    for (int j = 0; j < comp[i].size(); j++) res.push_back(comp[i][j]);
  for (int i = 0; i < n; i++) ind[res[i]] = i;
  make(1, 0, n);
  for (int i = 0; i < q; i++)
    if (Q[i].first == 1) {
      int t = getmx(1, ind[S[i]], ind[E[i]] + 1);
      cout << p[t] << '\n';
      p[t] = 0;
      chg(1, ind[t]);
    }
}
