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;
class intervalac {
  vector<int> l, r;
  vector<int> wh, p;
  int n;
  void merge(int vr) {
    if (p[wh[vr * 2 + 1]] > p[wh[vr * 2 + 2]]) {
      wh[vr] = wh[vr * 2 + 1];
    } else {
      wh[vr] = wh[vr * 2 + 2];
    }
  }
  int maximum(int li, int ri, int vr = 0) {
    if (ri < l[vr] || r[vr] < li) {
      return -1;
    }
    if (li <= l[vr] && r[vr] <= ri) {
      return wh[vr];
    }
    int w1 = maximum(li, ri, vr * 2 + 1);
    int w2 = maximum(li, ri, vr * 2 + 2);
    if (w1 == -1 || w2 == -1) {
      return max(w1, w2);
    }
    if (p[w1] > p[w2]) {
      return w1;
    }
    return w2;
  }

 public:
  intervalac(int N, vector<int> P) : p(P) {
    int n2 = 1;
    while (n2 < N) {
      n2 <<= 1;
    }
    n = n2;
    wh.resize(n2 * 2 - 1);
    l.resize(n2 * 2 - 1);
    r.resize(n2 * 2 - 1);
    p.resize(n2, -1);
    for (int i = n2 - 1; i < n2 * 2 - 1; i++) {
      wh[i] = l[i] = r[i] = i - (n2 - 1);
    }
    for (int i = n2 - 2; i >= 0; i--) {
      l[i] = l[i * 2 + 1];
      r[i] = r[i * 2 + 2];
      merge(i);
    }
  }
  int go(int li, int ri) {
    int in = maximum(li, ri);
    if (in > p.size() || in == -1) {
      return 0;
    }
    int ans = p[in];
    p[in] = 0;
    int vr = in + (n - 1);
    while (vr) {
      vr = (vr - 1) >> 1;
      merge(vr);
    }
    return ans;
  }
};
class query {
 public:
  int typ, i;
  int l, r;
};
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, m, q;
  cin >> n >> m >> q;
  vector<int> p(n);
  for (int i = 0; i < n; i++) {
    cin >> p[i];
  }
  vector<pair<int, int> > edg(m);
  for (int i = 0; i < m; i++) {
    cin >> edg[i].first >> edg[i].second;
    edg[i].first--;
    edg[i].second--;
  }
  vector<bool> deleted(m, false);
  vector<query> qr(q);
  for (int i = 0; i < q; i++) {
    cin >> qr[i].typ >> qr[i].i;
    qr[i].i--;
    if (qr[i].typ == 2) {
      deleted[qr[i].i] = true;
    }
  }
  for (int i = 0; i < m; i++) {
    if (!deleted[i]) {
      qr.push_back({2, i});
    }
  }
  q = qr.size();
  vector<int> index(n, 0);
  vector<int> s(n, 1);
  vector<vector<int> > mem(n);
  vector<int> wh(n);
  for (int i = 0; i < n; i++) {
    mem[i].push_back(i);
    wh[i] = i;
  }
  for (int i = qr.size() - 1; i >= 0; i--) {
    if (qr[i].typ == 1) {
      continue;
    }
    int a = wh[edg[qr[i].i].first], b = wh[edg[qr[i].i].second];
    if (a == b) {
      continue;
    }
    if (s[a] < s[b]) {
      swap(a, b);
    }
    for (int& j : mem[b]) {
      mem[a].push_back(j);
      index[j] += s[a];
      wh[j] = a;
    }
    s[a] += s[b];
    mem[b].clear();
  }
  int sum = 0;
  for (int i = 0; i < n; i++) {
    for (int& j : mem[i]) {
      index[j] += sum;
    }
    sum += mem[i].size();
  }
  vector<int> l(n), r(n);
  vector<int> pi(n);
  for (int i = 0; i < n; i++) {
    s[i] = 1;
    mem[i] = {i};
    wh[i] = i;
    l[i] = r[i] = index[i];
    pi[index[i]] = p[i];
  }
  for (int i = qr.size() - 1; i >= 0; i--) {
    if (qr[i].typ == 1) {
      qr[i].l = l[wh[qr[i].i]];
      qr[i].r = r[wh[qr[i].i]];
    } else {
      int a = wh[edg[qr[i].i].first], b = wh[edg[qr[i].i].second];
      if (s[a] < s[b]) {
        swap(a, b);
      }
      if (a == b) {
        continue;
      }
      l[a] = min(l[a], l[b]);
      r[a] = max(r[a], r[b]);
      for (int& j : mem[b]) {
        mem[a].push_back(j);
        index[j] += s[a];
        wh[j] = a;
      }
      s[a] += s[b];
      mem[b].clear();
    }
  }
  intervalac in(n, pi);
  for (int i = 0; i < q; i++) {
    if (qr[i].typ == 1) {
      cout << in.go(qr[i].l, qr[i].r) << "\n";
    }
  }
  return 0;
}
