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 + 10;
int rd() {
  int x = 0;
  char c = getchar();
  while (c < '0' || c > '9') c = getchar();
  while (c <= '9' && c >= '0') x = x * 10 + c - '0', c = getchar();
  return x;
}
int n, m, q, p[N], sa[N], op[N], xi[N];
struct edge {
  int fr, to, t;
  bool operator<(edge x) const { return t > x.t; }
} e[N];
int fa[N], dad[N], val[N], cnt;
int getfa(int x) { return x == dad[x] ? x : dad[x] = getfa(dad[x]); }
void uni(int x, int y, int w) {
  x = getfa(x), y = getfa(y);
  if (x != y) {
    cnt++;
    fa[x] = fa[y] = cnt;
    dad[x] = dad[y] = cnt;
    fa[cnt] = dad[cnt] = cnt;
    val[cnt] = w;
  }
}
vector<int> G[N];
bool isfa[N];
int dfn[N], sz[N], A[N][19], tmp;
int mx[N * 4];
void update(int u) { mx[u] = max(mx[u * 2], mx[u * 2 + 1]); }
void modify(int u, int l, int r, int x, int k) {
  if (l == r) {
    mx[u] = k;
    return;
  }
  int mid = (l + r) >> 1;
  if (mid >= x)
    modify(u * 2, l, mid, x, k);
  else
    modify(u * 2 + 1, mid + 1, r, x, k);
  update(u);
}
int query(int u, int l, int r, int x, int y) {
  if (l >= x && r <= y) return mx[u];
  int mid = (l + r) >> 1, res = 0;
  if (mid >= x) res = query(u * 2, l, mid, x, y);
  if (mid < y) res = max(res, query(u * 2 + 1, mid + 1, r, x, y));
  return res;
}
void dfs(int u) {
  dfn[u] = ++tmp;
  sz[u] = 1;
  A[u][0] = fa[u];
  for (int j = 1; j < 19; j++) A[u][j] = A[A[u][j - 1]][j - 1];
  if (u <= n) modify(1, 1, cnt, dfn[u], p[u]);
  for (int i = 0; i < G[u].size(); i++) {
    int v = G[u][i];
    dfs(v);
    sz[u] += sz[v];
  }
}
int main() {
  n = rd(), m = rd(), q = rd();
  for (int i = 1; i <= n; i++) {
    p[i] = rd();
    sa[p[i]] = i;
  }
  for (int i = 1; i <= m; i++) {
    e[i].fr = rd(), e[i].to = rd();
    e[i].t = q + 1;
  }
  for (int i = 1; i <= q; i++) {
    op[i] = rd(), xi[i] = rd();
    if (op[i] == 2) e[xi[i]].t = i;
  }
  sort(e + 1, e + 1 + m);
  cnt = n;
  for (int i = 1; i <= n; i++) fa[i] = dad[i] = i, val[i] = q + 1;
  for (int i = 1; i <= m; i++) uni(e[i].fr, e[i].to, e[i].t);
  for (int i = 1; i <= cnt; i++)
    if (i != fa[i])
      G[fa[i]].push_back(i);
    else
      isfa[i] = true;
  for (int i = 1; i <= cnt; i++)
    if (isfa[i]) dfs(i);
  for (int i = 1; i <= q; i++)
    if (op[i] == 1) {
      int u = xi[i];
      for (int j = 18; j >= 0; j--)
        if (val[A[u][j]] >= i) u = A[u][j];
      int ans = query(1, 1, cnt, dfn[u], dfn[u] + sz[u] - 1);
      printf("%d\n", ans);
      if (ans != 0) modify(1, 1, cnt, dfn[sa[ans]], 0);
    }
  return 0;
}
