#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int> > v, queries;
vector<int> adj[1000009];
int val[200009];
int neww, tree[4000009], qvalue[1000009], visited[1000009], endd[1000009], k,
    p[2000009], n, m, q, present[300009], parent[1000009];
void update(int node, int start, int endd, int ind, int val) {
  if (start == endd) {
    tree[node] = val;
    return;
  }
  int mid = (start + endd) / 2;
  if (ind <= mid)
    update(2 * node, start, mid, ind, val);
  else {
    update(2 * node + 1, mid + 1, endd, ind, val);
  }
  tree[node] = max(tree[2 * node], tree[2 * node + 1]);
}
int query(int node, int start, int endd, int l, int r) {
  if (start > endd || l > r || start > r || endd < l) return 0;
  if (start >= l && endd <= r) return tree[node];
  int mid = (start + endd) / 2;
  return max(query(2 * node, start, mid, l, r),
             query(2 * node + 1, mid + 1, endd, l, r));
}
void dfs(int i) {
  if (visited[i]) return;
  visited[i] = endd[i] = ++neww;
  update(1, 1, k, visited[i], p[i]);
  for (int j = 0; j < adj[i].size(); j++) {
    dfs(adj[i][j]);
    endd[i] = max(endd[i], endd[adj[i][j]]);
  }
}
int root(int i) {
  while (parent[i] != i) {
    parent[i] = parent[parent[i]];
    i = parent[i];
  }
  return i;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n >> m >> q;
  for (int i = 1; i <= n; i++) {
    cin >> p[i];
    val[p[i]] = i;
    parent[i] = i;
  }
  for (int i = n + 1; i <= 1000000; i++) parent[i] = i;
  for (int i = 1; i <= m; i++) {
    int x, y;
    cin >> x >> y;
    v.push_back({x, y});
  }
  k = n + 1;
  for (int i = 1; i <= q; i++) {
    int x, y;
    cin >> x >> y;
    queries.push_back({x, y});
    if (x == 2) present[y] = 1;
  }
  for (int i = 1; i <= m; i++) {
    if (present[i] == 0) {
      int p1 = root(v[i - 1].first), p2 = root(v[i - 1].second);
      if (p1 != p2) {
        adj[k].push_back(p1);
        adj[k].push_back(p2);
        parent[p1] = parent[p2] = k;
        k++;
      }
    }
  }
  for (int i = q - 1; i >= 0; i--) {
    if (queries[i].first == 2) {
      int p1 = root(v[queries[i].second - 1].first),
          p2 = root(v[queries[i].second - 1].second);
      if (p1 != p2) {
        adj[k].push_back(p1);
        adj[k].push_back(p2);
        parent[p1] = parent[p2] = k;
        qvalue[i] = k;
        k++;
      }
    } else {
      int tt = queries[i].second;
      int pita = root(tt);
      qvalue[i] = pita;
    }
  }
  for (int i = k - 1; i >= 1; i--) {
    if (!visited[i]) dfs(i);
  }
  for (int i = 0; i < q; i++) {
    if (queries[i].first == 1) {
      int l = visited[qvalue[i]];
      int r = endd[qvalue[i]];
      int ans = query(1, 1, k, l, r);
      if (ans) {
        update(1, 1, k, visited[val[ans]], 0);
      }
      cout << ans << "\n";
    }
  }
  return 0;
}
