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 int N = 5e5 + 3;
const int M = 3e5 + 4;
const int QU = 5e5 + 3;
int n, m, q;
int val[N];
pair<int, int> edge[M];
pair<int, int> qu[QU];
bool kt[M];
int cha[N], rnk[N];
int init;
int tin[N], tout[N];
vector<int> adj[N];
int findcha(int u) {
  if (cha[u] != u) return cha[u] = findcha(cha[u]);
  return cha[u];
}
bool join(int u, int v) {
  u = findcha(u);
  v = findcha(v);
  if (u == v) return false;
  n++;
  cha[u] = n;
  cha[v] = n;
  cha[n] = n;
  adj[n].push_back(u);
  adj[n].push_back(v);
  return true;
}
int dem = 0;
void dfs(int i, int j) {
  dem++;
  tin[i] = dem;
  for (int u : adj[i]) {
    if (u == j) continue;
    dfs(u, i);
  }
  tout[i] = dem;
}
struct ok {
  int lo;
  int hi;
  int val;
  int pos;
};
ok Node[4 * N];
void build(int id, int l, int r) {
  Node[id].lo = l;
  Node[id].hi = r;
  if (l == r) return;
  int mid = (l + r) / 2;
  build(id * 2, l, mid);
  build(id * 2 + 1, mid + 1, r);
}
void update(int id, int pos, int val) {
  if (Node[id].lo > pos || Node[id].hi < pos) return;
  if (Node[id].lo == Node[id].hi) {
    Node[id].val = val;
    Node[id].pos = pos;
    return;
  }
  update(id * 2, pos, val);
  update(id * 2 + 1, pos, val);
  Node[id].val = max(Node[id * 2].val, Node[id * 2 + 1].val);
  if (Node[id * 2].val > Node[id * 2 + 1].val)
    Node[id].pos = Node[id * 2].pos;
  else
    Node[id].pos = Node[id * 2 + 1].pos;
}
pair<int, int> getma(int id, int l, int r) {
  if (Node[id].lo > r || Node[id].hi < l) return {0, 0};
  if (l <= Node[id].lo && Node[id].hi <= r) return {Node[id].val, Node[id].pos};
  return max(getma(id * 2, l, r), getma(id * 2 + 1, l, r));
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m >> q;
  for (int i = 1; i <= n; i++) cin >> val[i];
  memset(kt, true, sizeof kt);
  for (int i = 1; i <= m; i++) cin >> edge[i].first >> edge[i].second;
  for (int i = 1; i <= q; i++) {
    cin >> qu[i].first >> qu[i].second;
    if (qu[i].first == 2) kt[qu[i].second] = false;
  }
  for (int i = 1; i <= n; i++) cha[i] = i;
  init = n;
  for (int i = 1; i <= m; i++) {
    if (!kt[i]) continue;
    join(edge[i].first, edge[i].second);
  }
  for (int i = q; i > 0; i--) {
    if (qu[i].first == 2) {
      int id = qu[i].second;
      join(edge[id].first, edge[id].second);
    } else {
      qu[i].second = findcha(qu[i].second);
    }
  }
  dfs(n, 0);
  build(1, 1, dem);
  for (int i = 1; i <= init; i++) update(1, tin[i], val[i]);
  for (int i = 1; i <= q; i++) {
    if (qu[i].first == 1) {
      pair<int, int> top = getma(1, tin[qu[i].second], tout[qu[i].second]);
      cout << top.first << '\n';
      update(1, top.second, 0);
    }
  }
}
