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 = 200010;
const int M = 300010;
struct OP {
  int opt, x;
} op[500010];
int f[N], sz[N], vis[M], p[N];
vector<int> son[N], tmp;
pair<int, int> edge[M], h[M];
set<pair<int, int>> st[N];
int find(int x) {
  if (f[x] == x) return x;
  return find(f[x]);
}
void dfs(int u, int z) {
  if (u == z) return;
  tmp.push_back(u);
  for (int v : son[u]) dfs(v, z);
}
void unite(int x, int y, int i) {
  int px = find(x), py = find(y);
  if (px == py) return;
  if (sz[px] >= sz[py]) {
    f[py] = px;
    son[px].push_back(py);
    sz[px] += sz[py];
    h[i] = {py, px};
  } else {
    f[px] = py;
    son[py].push_back(px);
    sz[py] += sz[px];
    h[i] = {px, py};
  }
}
int main() {
  int n, m, q;
  scanf("%d%d%d", &n, &m, &q);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &p[i]);
    f[i] = i;
    sz[i] = 1;
  }
  for (int i = 1; i <= m; i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    edge[i] = {u, v};
  }
  for (int i = 1; i <= q; i++) {
    int opt, x;
    scanf("%d%d", &opt, &x);
    op[i] = {opt, x};
    if (opt == 2) vis[x] = 1;
  }
  for (int i = 1; i <= m; i++) {
    if (vis[i]) continue;
    int u = edge[i].first, v = edge[i].second;
    unite(u, v, i);
  }
  for (int i = q; i >= 1; i--) {
    int opt = op[i].opt;
    if (opt == 1) continue;
    int x = op[i].x;
    int u = edge[x].first, v = edge[x].second;
    unite(u, v, x);
  }
  for (int i = 1; i <= n; i++) st[find(i)].insert({p[i], i});
  for (int i = 1; i <= q; i++) {
    int opt = op[i].opt;
    if (opt == 1) {
      int x = find(op[i].x);
      auto it = --st[x].end();
      int u = (*it).second;
      st[x].erase(it);
      printf("%d\n", p[u]);
      p[u] = 0;
      st[x].insert({p[u], u});
    } else {
      int e = op[i].x;
      if (h[e].first == 0) continue;
      int x = h[e].first, y = h[e].second;
      if (sz[y] - sz[x] >= sz[x]) {
        dfs(x, 0);
        for (int u : tmp) {
          st[y].erase({p[u], u});
          st[x].insert({p[u], u});
        }
        tmp.clear();
      } else {
        dfs(y, x);
        for (int u : tmp) {
          st[y].erase({p[u], u});
          st[x].insert({p[u], u});
        }
        swap(st[x], st[y]);
      }
      f[x] = x;
      son[y].pop_back();
      sz[y] -= sz[x];
    }
  }
  return 0;
}
