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 long long INF = 2e15;
const long long MB = 30;
const long long MOD = 1e9 + 7;
const long long maxN = 5e5;
struct SegmentTree {
  vector<long long> t, ind;
  long long n;
  SegmentTree(long long x, vector<long long>& a) {
    n = x;
    t.resize(n << 2);
    ind.resize(n << 2);
    buildTree(1, 0, n, a);
  }
  void buildTree(long long v, long long l, long long r, vector<long long>& a) {
    if (l + 1 == r) {
      t[v] = a[l];
      ind[v] = l;
      return;
    }
    long long m = (l + r) >> 1;
    long long vl = v << 1;
    long long vr = vl + 1;
    buildTree(vl, l, m, a);
    buildTree(vr, m, r, a);
    ind[v] = t[vl] > t[vr] ? ind[vl] : ind[vr];
    t[v] = max(t[vl], t[vr]);
  }
  long long start, end, res, id;
  long long get(long long l, long long r) {
    start = l;
    end = r + 1;
    res = 0;
    id = l;
    getTree(1, 0, n);
    return id;
  }
  void getTree(long long v, long long l, long long r) {
    if (start <= l && r <= end) {
      if (res < t[v]) {
        res = t[v];
        id = ind[v];
      }
      return;
    }
    long long m = (l + r) >> 1;
    long long vl = v << 1;
    long long vr = vl + 1;
    if (start < m) getTree(vl, l, m);
    if (m < end) getTree(vr, m, r);
  }
  void update(long long i) {
    id = i;
    updateTree(1, 0, n);
  }
  void updateTree(long long v, long long l, long long r) {
    if (l + 1 == r) {
      t[v] = 0;
      return;
    }
    long long m = (l + r) >> 1;
    long long vl = v << 1;
    long long vr = vl + 1;
    if (id < m)
      updateTree(vl, l, m);
    else
      updateTree(vr, m, r);
    ind[v] = t[vl] > t[vr] ? ind[vl] : ind[vr];
    t[v] = max(t[vl], t[vr]);
  }
};
struct DSU1 {
  vector<long long> p;
  vector<vector<pair<long long, long long>>> nums;
  DSU1(long long n) {
    p.resize(n);
    nums.resize(n);
    for (long long i = 0; i < n; i++) {
      p[i] = i;
      nums[i] = {{i, 0}};
    }
  }
  long long find(long long x) {
    if (x == p[x]) return x;
    return p[x] = find(p[x]);
  }
  void unite(long long a, long long b) {
    a = find(a);
    b = find(b);
    if (a == b) return;
    if (nums[a].size() < nums[b].size()) swap(a, b);
    long long x = nums[a].size();
    for (auto& p : nums[b]) {
      nums[a].push_back({p.first, p.second + x});
    }
    p[b] = a;
  }
};
struct DSU2 {
  vector<long long> p, l, r;
  DSU2(long long n, vector<long long>& a) {
    p.resize(n);
    l.resize(n);
    r.resize(n);
    for (long long i = 0; i < n; i++) {
      p[i] = i;
      l[i] = r[i] = a[i];
    }
  }
  long long find(long long x) {
    if (x == p[x]) return x;
    return p[x] = find(p[x]);
  }
  void unite(long long a, long long b) {
    a = find(a);
    b = find(b);
    if (a == b) return;
    if (r[a] - l[a] < r[b] - l[b]) swap(a, b);
    l[a] = min(l[b], l[a]);
    r[a] = max(r[b], r[a]);
    p[b] = a;
  }
};
void solve() {
  long long n, m, q;
  cin >> n >> m >> q;
  vector<long long> p(n);
  for (long long i = 0; i < n; i++) cin >> p[i];
  vector<pair<long long, long long>> edges(m);
  for (long long i = 0; i < m; i++) {
    long long from, to;
    cin >> from >> to;
    from--;
    to--;
    edges[i] = {from, to};
  }
  vector<bool> bad(m);
  vector<pair<long long, long long>> qu(q);
  for (long long i = 0; i < q; i++) {
    long long t, v;
    cin >> t >> v;
    v--;
    t--;
    qu[i] = {t, v};
    if (t) bad[v] = true;
  }
  DSU1 dsu1(n);
  for (long long i = 0; i < m; i++) {
    if (!bad[i]) dsu1.unite(edges[i].first, edges[i].second);
  }
  for (long long i = q - 1; i >= 0; i--) {
    long long t = qu[i].first;
    long long id = qu[i].second;
    if (!t) continue;
    dsu1.unite(edges[id].first, edges[id].second);
  }
  for (long long i = 1; i < n; i++) {
    dsu1.unite(0, i);
  }
  auto help = dsu1.nums[dsu1.find(0)];
  vector<long long> b(n);
  for (long long i = 0; i < n; i++) {
    b[help[i].first] = help[i].second;
  }
  DSU2 dsu2(n, b);
  for (long long i = 0; i < m; i++) {
    if (!bad[i]) dsu2.unite(edges[i].first, edges[i].second);
  }
  vector<pair<long long, long long>> seg(q);
  for (long long i = q - 1; i >= 0; i--) {
    long long t = qu[i].first;
    long long id = qu[i].second;
    if (t) {
      dsu2.unite(edges[id].first, edges[id].second);
    } else {
      seg[i] = {dsu2.l[dsu2.find(id)], dsu2.r[dsu2.find(id)]};
    }
  }
  vector<long long> c(n);
  for (long long i = 0; i < n; i++) {
    c[b[i]] = p[i];
  }
  SegmentTree tree(n, c);
  for (long long i = 0; i < q; i++) {
    if (qu[i].first) continue;
    long long l = seg[i].first;
    long long r = seg[i].second;
    long long id = tree.get(l, r);
    tree.update(id);
    cout << c[id] << '\n';
    c[id] = 0;
  }
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  cout << fixed << setprecision(15);
  long long t = 1;
  while (t--) solve();
}
