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 MX = (1 << 20);
int n, m, q, timer = 1;
vector<int> a, arr;
vector<pair<int, int> > edges, queries;
vector<int> v[MX];
int poss[MX];
int par[MX];
bool vis[MX];
bool deleted[MX];
bool cant[MX];
int in[MX];
int out[MX];
int tree[1 << 21];
class Disjoint_Set {
 public:
  int sz[MX], P[MX];
  int comp;
  void init(int N) {
    for (int j = 1; j <= N; j++) sz[j] = 1, P[j] = j;
    comp = N;
  }
  int find_(int x) {
    if (x != P[x]) P[x] = find_(P[x]);
    return P[x];
  }
  bool merge_(int x, int y, bool f) {
    int px = find_(x), py = find_(y);
    if (px == py) return false;
    if (sz[px] < sz[py] && !f) swap(px, py);
    P[py] = px;
    comp--;
    sz[px] += sz[py];
    return true;
  }
} dsu;
void add_edge(int x, int y) {
  v[x].push_back(y);
  cant[y] = 1;
}
void read_input() {
  scanf("%d%d%d", &n, &m, &q);
  a.resize(n + 1);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    poss[a[i]] = i;
  }
  edges.resize(m + 2);
  for (int i = 1; i <= m; i++) {
    scanf("%d%d", &edges[i].first, &edges[i].second);
  }
  queries.resize(q);
  for (auto &query : queries) {
    scanf("%d%d", &query.first, &query.second);
  }
}
void pre_proccess() {
  for (auto query : queries) {
    int i = query.second;
    if (query.first == 2) deleted[i] = 1;
  }
  dsu.init(n + q);
  for (int j = 1; j <= m; j++) {
    pair<int, int> edge = edges[j];
    if (deleted[j]) continue;
    int x = edge.first, y = edge.second;
    if (dsu.merge_(x, y, 0)) {
      add_edge(x, y);
    }
  }
}
int handle_queries() {
  int c = 1;
  for (int i = q - 1; i >= 0; i--) {
    pair<int, int> query = queries[i];
    int ty = query.first;
    if (ty == 1) {
      int x = query.second;
      int p = dsu.find_(x);
      par[i] = p;
      continue;
    }
    int j = query.second;
    int x = edges[j].first, y = edges[j].second;
    x = dsu.find_(x);
    y = dsu.find_(y);
    if (x == y) continue;
    int new_node = n + c;
    c++;
    dsu.merge_(new_node, x, 1);
    dsu.merge_(new_node, y, 1);
    add_edge(new_node, x);
    add_edge(new_node, y);
  }
  c--;
  return n + c;
}
void dfs(int node, int par = -1) {
  vis[node] = 1;
  in[node] = timer++;
  if (node <= n) {
    poss[a[node]] = arr.size();
    arr.push_back(a[node]);
  } else
    arr.push_back(0);
  for (auto nx : v[node]) {
    if (!vis[nx]) dfs(nx, node);
  }
  out[node] = timer - 1;
}
void build(int pos, int l, int r) {
  if (l == r) {
    tree[pos] = arr[l];
    return;
  }
  int md = (l + r) / 2;
  build(2 * pos, l, md);
  build(2 * pos + 1, md + 1, r);
  tree[pos] = max(tree[2 * pos], tree[2 * pos + 1]);
}
int query_tree(int pos, int l, int r, int st, int en) {
  if (l > en || st > r) return 0;
  if (l >= st && r <= en) return tree[pos];
  int md = (l + r) / 2;
  int x = query_tree(2 * pos, l, md, st, en);
  int y = query_tree(2 * pos + 1, md + 1, r, st, en);
  return max(x, y);
}
void update(int pos, int l, int r, int tar) {
  if (l == r && l == tar) {
    tree[pos] = 0;
    return;
  }
  int md = (l + r) / 2;
  if (tar >= l && tar <= md)
    update(2 * pos, l, md, tar);
  else
    update(2 * pos + 1, md + 1, r, tar);
  tree[pos] = max(tree[2 * pos], tree[2 * pos + 1]);
}
void solve(int nodes) {
  for (int i = 0; i < q; i++) {
    pair<int, int> query = queries[i];
    int ty = query.first, x = query.second;
    if (ty == 2) continue;
    x = par[i];
    int st = in[x];
    int en = out[x];
    int amid = query_tree(1, 1, nodes, st, en);
    if (amid != 0) {
      int p = poss[amid];
      update(1, 1, nodes, p);
    }
    printf("%d\n", amid);
  }
}
void test_case() {
  read_input();
  pre_proccess();
  int nodes = handle_queries();
  arr.push_back(0);
  for (int i = 1; i <= nodes; i++) {
    if (!vis[i] && cant[i] == 0) dfs(i);
  }
  build(1, 1, nodes);
  solve(nodes);
}
int main() {
  int t = 1;
  while (t--) test_case();
}
