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;
using ll = long long;
const int mxn = 3e5 + 1;
int arr[mxn];
int edgesu[mxn], edgesv[mxn];
int L1[mxn], L2[mxn];
set<pair<int, int>> LOL[mxn];
int mark[mxn];
struct DSU {
  int connected;
  vector<int> par, sz;
  vector<set<pair<int, int>>> s;
  void init(int n) {
    par = sz = vector<int>(n + 1, 0);
    s = vector<set<pair<int, int>>>(n + 1);
    for (int i = 1; i <= n; ++i) s[i].insert({arr[i], i});
    for (int i = 1; i <= n; i++) {
      par[i] = i, sz[i] = 1;
    }
    connected = n;
  }
  int getPar(int u) {
    if (u != par[u]) return getPar(par[u]);
    return u;
  }
  int getSize(int u) { return sz[getPar(u)]; }
  int getAns(int u) {
    int par2 = getPar(u);
    auto it = *s[par2].rbegin();
    s[par2].erase(it);
    arr[it.second] = 0;
    s[par2].insert({0, it.second});
    return it.first;
  }
  void unite(int u, int v, int val) {
    int par1 = getPar(u), par2 = getPar(v);
    if (par1 == par2) return;
    connected--;
    if (sz[par1] > sz[par2]) swap(par1, par2);
    for (auto &x : s[par1]) {
      s[par2].insert(x);
    }
    sz[par2] += sz[par1];
    par[par1] = par[par2];
    if (val) {
      mark[val] = 1;
      LOL[val] = s[par1];
      L1[val] = par1;
      L2[val] = par2;
    }
  }
};
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n, m, q;
  cin >> n >> m >> q;
  int q1[q + 1], q2[q + 1];
  for (int i = 1; i <= n; ++i) cin >> arr[i];
  memset(mark, 0, sizeof(mark));
  for (int i = 1; i <= m; ++i) {
    cin >> edgesu[i] >> edgesv[i];
  }
  for (int i = 1; i <= q; ++i) {
    cin >> q1[i] >> q2[i];
    if (q1[i] == 2) mark[q2[i]] = 1;
  }
  DSU dsu;
  dsu.init(n);
  for (int i = 1; i <= m; ++i) {
    if (mark[i]) continue;
    dsu.unite(edgesu[i], edgesv[i], 0);
  }
  memset(mark, 0, sizeof(mark));
  for (int i = q; i > 0; --i) {
    if (q1[i] == 2) dsu.unite(edgesu[q2[i]], edgesv[q2[i]], q2[i]);
  }
  for (int i = 1; i <= q; ++i) {
    if (q1[i] == 1) {
      cout << dsu.getAns(q2[i]) << '\n';
      ;
    } else {
      if (mark[q2[i]]) {
        int I = q2[i];
        int val = L2[I];
        dsu.s[L1[I]].clear();
        for (auto &x : LOL[I]) {
          dsu.s[val].erase({arr[x.second], x.second});
          dsu.s[L1[I]].insert({arr[x.second], x.second});
        }
        dsu.par[L1[I]] = L1[I];
      }
    }
  }
  return 0;
}
