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;
inline long long read() {
  long long x = 0, f = 1;
  char s = getchar();
  while ((s < '0' || s > '9') && s > 0) {
    if (s == '-') f *= -1;
    s = getchar();
  }
  while (s >= '0' && s <= '9') {
    x = (x << 1) + (x << 3) + s - '0';
    s = getchar();
  }
  return f > 0 ? x : -x;
}
int n = read(), m = read(), q = read(), w[200005], q1, q2, u[300005], v[300005];
int c[500004], gp[500004];
bool del[300005], st[500004];
int f[200005 * 3], p, IN = n, IM, ls[200005 << 1], rs[200005 << 1],
                      ld[200005 << 1], rd[200005 << 1], tp[200005], fa[200005];
inline int findset(int x) { return fa[x] == 0 ? x : (fa[x] = findset(fa[x])); }
inline int MAX(int x, int y) { return w[x] > w[y] ? x : y; }
inline void dfs(int x) {
  if (x == 0) return;
  ld[x] = IM, dfs(ls[x]), dfs(rs[x]);
  if (x <= n) IM++, f[p + IM] = x;
  rd[x] = IM;
}
inline int zero(int x) {
  int res = w[x];
  for (w[x] = 0, x = p + rd[x] >> 1; x > 0; x >>= 1)
    f[x] = MAX(f[x << 1], f[x << 1 | 1]);
  return res;
}
inline int sch(int l, int r) {
  int res = 0;
  for (l = p + l - 1, r = p + r + 1; (l ^ 1) != r; l >>= 1, r >>= 1) {
    if ((l & 1) ^ 1) res = MAX(f[l ^ 1], res);
    if (r & 1) res = MAX(f[r ^ 1], res);
  }
  return res;
}
int main() {
  for (int i = 1; i <= n; i++) w[i] = read(), tp[i] = i;
  for (int i = 1; i <= m; i++) u[i] = read(), v[i] = read();
  for (int i = 1; i <= q; i++) {
    st[i] = read() - 1, c[i] = read();
    if (st[i]) del[c[i]] = 1;
  }
  for (int i = 1; i <= m; i++)
    if (!del[i])
      if (findset(u[i]) != findset(v[i])) {
        IN++, ls[IN] = tp[findset(u[i])], rs[IN] = tp[findset(v[i])];
        fa[findset(v[i])] = findset(u[i]), tp[findset(u[i])] = IN;
      }
  for (int i = q; i > 0; i--) {
    if (st[i]) {
      int x = u[c[i]], y = v[c[i]];
      if (findset(x) != findset(y)) {
        IN++, ls[IN] = tp[findset(x)], rs[IN] = tp[findset(y)];
        fa[findset(y)] = findset(x), tp[findset(x)] = IN;
      }
    } else
      gp[i] = tp[findset(c[i])];
  }
  for (p = 1; p < n + 2; p <<= 1)
    ;
  for (int i = IN; i > 0; i--)
    if (!rd[i]) dfs(i);
  for (int i = p - 1; i > 0; i--) f[i] = MAX(f[i << 1], f[i << 1 | 1]);
  for (int i = 1; i <= q; i++)
    if (!st[i]) printf("%d\n", zero(sch(ld[gp[i]] + 1, rd[gp[i]])));
  return 0;
}
