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 = 1e6 + 5;
int n, m, q, f[N], u[N], v[N], op[N], x[N], dfn[N], l[N], r[N], tot, a[N];
vector<int> g[N];
bool vis[N];
bool del[N];
int find(int x) { return x == f[x] ? x : f[x] = find(f[x]); }
int cnt;
void un(int x, int y) {
  int fx = find(x), fy = find(y);
  if (fx == fy) return;
  cnt++;
  f[fx] = cnt, f[fy] = cnt;
  g[cnt].push_back(fx), g[cnt].push_back(fy);
}
void dfs(int u) {
  vis[u] = 1;
  dfn[u] = ++cnt;
  l[u] = cnt;
  for (auto v : g[u]) dfs(v);
  r[u] = cnt;
}
int mx[N << 2], p[N];
void upd(int pos, int c, int l, int r, int rt) {
  if (l == r) {
    mx[rt] = c;
    return;
  }
  int m = l + r >> 1;
  if (pos <= m)
    upd(pos, c, l, m, rt << 1);
  else
    upd(pos, c, m + 1, r, rt << 1 | 1);
  mx[rt] = max(mx[rt << 1], mx[rt << 1 | 1]);
}
int qry(int L, int R, int l, int r, int rt) {
  if (L <= l && r <= R) {
    return mx[rt];
  }
  int m = l + r >> 1;
  int ans = 0;
  if (L <= m) ans = max(ans, qry(L, R, l, m, rt << 1));
  if (R > m) ans = max(ans, qry(L, R, m + 1, r, rt << 1 | 1));
  return ans;
}
int main() {
  scanf("%d%d%d", &n, &m, &q);
  for (int i = (1); i < (n + 1); i++) {
    scanf("%d", &a[i]);
    p[a[i]] = i;
  }
  for (int i = (1); i < (m + 1); i++) scanf("%d%d", u + i, v + i);
  for (int i = (1); i < (q + 1); i++) {
    scanf("%d%d", &op[i], &x[i]);
    if (op[i] == 2) del[x[i]] = 1;
  }
  cnt = n;
  for (int i = (1); i < (2 * n); i++) f[i] = i;
  for (int i = (1); i < (m + 1); i++)
    if (!del[i]) un(u[i], v[i]);
  for (int i = q; i >= 1; --i) {
    if (op[i] == 1)
      x[i] = find(x[i]);
    else
      un(u[x[i]], v[x[i]]);
  }
  for (int i = cnt; i >= 1; --i) {
    if (!vis[i]) dfs(i);
  }
  for (int i = (1); i < (n + 1); i++) upd(dfn[i], a[i], 1, cnt, 1);
  for (int i = (1); i < (q + 1); i++) {
    if (op[i] == 1) {
      int ans = qry(l[x[i]], r[x[i]], 1, cnt, 1);
      printf("%d\n", ans);
      if (ans) {
        upd(dfn[p[ans]], 0, 1, cnt, 1);
      }
    }
  }
  return 0;
}
