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 N = 2e5 + 25;
const int M = 3e5 + 35;
const int Q = 5e5 + 55;
int n, m, q;
vector<int> g[N];
int a[M], b[M], p[N];
int type[Q], ind[Q];
vector<int> ord[N];
int dsup[N], pos[N];
int sz[N], ar[N], tr[N << 2];
struct DSU_Save {
  int u, v, pu, pv, szu, szv;
};
int find(int v) {
  if (dsup[v] == v) return v;
  return find(dsup[v]);
}
vector<DSU_Save> vds;
void dsusave(int u, int v) {
  vds.push_back({u, v, dsup[u], dsup[v], sz[u], sz[v]});
}
void rollback() {
  assert(!vds.empty());
  auto x = vds.back();
  vds.pop_back();
  dsup[x.u] = x.pu;
  dsup[x.v] = x.pv;
  sz[x.u] = x.szu;
  sz[x.v] = x.szv;
}
void combine(int u, int v) {
  u = find(u);
  v = find(v);
  dsusave(u, v);
  if (u == v) return;
  if (ord[u].size() < ord[v].size()) swap(u, v);
  for (int x : ord[v]) {
    ord[u].push_back(x);
  }
  dsup[v] = u;
  sz[u] += sz[v];
}
void build(int v, int l, int r) {
  if (l == r) {
    tr[v] = ar[l];
    return;
  }
  int m = (l + r) / 2;
  int v1 = v << 1;
  int v2 = v1 | 1;
  build(v1, l, m);
  build(v2, m + 1, r);
  if (p[tr[v1]] > p[tr[v2]])
    tr[v] = tr[v1];
  else
    tr[v] = tr[v2];
}
void update(int v, int l, int r, int ii) {
  if (l == r) {
    p[tr[v]] = 0;
    return;
  }
  int m = (l + r) / 2;
  int v1 = v << 1;
  int v2 = v1 | 1;
  if (ii <= m)
    update(v1, l, m, ii);
  else
    update(v2, m + 1, r, ii);
  if (p[tr[v1]] > p[tr[v2]])
    tr[v] = tr[v1];
  else
    tr[v] = tr[v2];
}
int query(int v, int s, int e, int l, int r) {
  if (l <= s && e <= r) return tr[v];
  int m = (s + e) / 2;
  int v1 = v << 1;
  int v2 = v1 | 1;
  if (r <= m) return query(v1, s, m, l, r);
  if (m < l) return query(v2, m + 1, e, l, r);
  int x = query(v1, s, m, l, r);
  int y = query(v2, m + 1, e, l, r);
  if (p[x] > p[y]) return x;
  return y;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout << setprecision(32);
  cin >> n >> m >> q;
  for (int i = 1; i <= n; i++) {
    cin >> p[i];
    ord[i].push_back(i);
    dsup[i] = i;
    sz[i] = 1;
  }
  for (int i = 1; i <= m; i++) {
    cin >> a[i] >> b[i];
  }
  set<int> remst;
  for (int i = 1; i <= q; i++) {
    cin >> type[i] >> ind[i];
    if (type[i] == 2) remst.insert(ind[i]);
  }
  for (int i = 1; i <= m; i++) {
    if (remst.count(i)) continue;
    combine(a[i], b[i]);
  }
  for (int i = q; i >= 1; i--) {
    if (type[i] == 2) {
      combine(a[ind[i]], b[ind[i]]);
    }
  }
  int ptr = 1;
  for (int i = 1; i <= n; i++) {
    if (find(i) != i) continue;
    for (auto x : ord[i]) {
      ar[ptr] = x;
      pos[x] = ptr;
      ptr++;
    }
  }
  build(1, 1, n);
  for (int i = 1; i <= q; i++) {
    if (type[i] == 1) {
      int u = ind[i];
      int l = pos[find(u)];
      int r = l + sz[find(u)] - 1;
      int x = query(1, 1, n, l, r);
      cout << p[x] << '\n';
      update(1, 1, n, pos[x]);
    } else {
      rollback();
    }
  }
  return 0;
}
