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;
void START() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
const int gh = 1e5 + 6;
int n, m, node[2 * gh], u[3 * gh], v[3 * gh], type[5 * gh], q[5 * gh],
    fa[2 * gh], sz[2 * gh];
bool vs[3 * gh], edge[3 * gh];
set<int, greater<int>> s[2 * gh];
stack<pair<int, int>> stk;
inline int anc(int i) {
  while (i != fa[i]) i = fa[i];
  return i;
}
bool join(int u, int v) {
  u = anc(u);
  v = anc(v);
  if (u == v) return false;
  if (sz[u] > sz[v]) swap(u, v);
  stk.push({u, fa[u]});
  stk.push({v, sz[v]});
  fa[u] = v;
  sz[v] += sz[u];
  for (auto x : s[u]) s[v].insert(x);
  return true;
}
void xiout(stack<pair<int, int>> s) {
  while (s.size()) {
    cout << "sz: " << s.top().first << ' ' << s.top().second << '\n';
    s.pop();
    cout << "fa: " << s.top().first << ' ' << s.top().second << '\n';
    s.pop();
  }
}
int main() {
  START();
  int T;
  cin >> n >> m >> T;
  for (int i = 1; i <= n; ++i) {
    fa[i] = i;
    sz[i] = 1;
  }
  for (int i = 1; i <= n; ++i) {
    int p;
    cin >> p;
    s[i].insert(p);
    node[p] = i;
  }
  for (int i = 1; i <= m; ++i) cin >> u[i] >> v[i];
  for (int i = 1; i <= T; ++i) {
    cin >> type[i] >> q[i];
    if (type[i] == 2) vs[q[i]] = true;
  }
  for (int i = 1; i <= m; ++i)
    if (!vs[i]) edge[i] = join(u[i], v[i]);
  for (int i = T; i > 0; --i)
    if (type[i] == 2) edge[q[i]] = join(u[q[i]], v[q[i]]);
  for (int i = 1; i <= T; ++i) {
    if (type[i] == 2) {
      if (!edge[q[i]]) continue;
      pair<int, int> t = stk.top();
      stk.pop();
      int v = t.first;
      sz[v] = t.second;
      t = stk.top();
      stk.pop();
      int u = t.first;
      fa[u] = t.second;
      for (auto x : s[u]) s[v].erase(x);
    } else {
      int t = anc(q[i]);
      int tmp = *s[t].begin();
      cout << tmp << '\n';
      int p = node[tmp];
      if (p == 0) continue;
      node[tmp] = 0;
      while (p != fa[p]) {
        s[p].erase(tmp);
        p = fa[p];
      }
      s[p].erase(tmp);
    }
  }
}
