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 ll = long long;
using ld = long double;
using namespace std;
const int N = 7e5 + 20;
const int T = 1 << 18;
int n, m, q, inv[N], p[N], a[N], b[N], type[N], x[N], par[N], in[N], out[N],
    qq[N], tree[T + T];
bool kil[N];
int Find(int x) {
  if (par[x] == x) return x;
  return par[x] = Find(par[x]);
}
void Onion(int x, int y) { par[Find(x)] = Find(y); }
vector<int> G[N];
void dfs(int v) {
  in[v] = ++*in;
  for (auto u : G[v]) dfs(u);
  out[v] = *in;
}
void sett(int x, int val) {
  x += T;
  tree[x] = val;
  for (x /= 2; x; x /= 2) tree[x] = max(tree[2 * x], tree[2 * x + 1]);
}
int query(int l, int r) {
  int res = 0;
  for (l += T, r += T + 1; l < r; l /= 2, r /= 2) {
    if (l & 1) res = max(res, tree[l++]);
    if (r & 1) res = max(res, tree[--r]);
  }
  return res;
}
int main() {
  scanf("%d%d%d", &n, &m, &q);
  for (int i = 1; i <= n; ++i) scanf("%d", p + i), inv[p[i]] = i;
  for (int i = 1; i <= m; ++i) scanf("%d%d", a + i, b + i);
  for (int i = 1; i <= q; ++i) {
    scanf("%d%d", type + i, x + i);
    if (type[i] == 2) kil[x[i]] = true;
  }
  for (int i = 1; i <= m; ++i)
    if (!kil[i]) {
      type[++q] = 2;
      x[q] = i;
    }
  for (int i = 1; i <= n; ++i) par[i] = i;
  int m = n;
  for (int i = q; 1 <= i; --i) {
    if (type[i] == 1) qq[i] = Find(x[i]);
    if (type[i] == 2) {
      int u = Find(a[x[i]]), v = Find(b[x[i]]);
      if (u != v) {
        m++;
        par[m] = m;
        G[m].push_back(u);
        G[m].push_back(v);
        Onion(u, m);
        Onion(v, m);
      }
    }
  }
  for (int i = m; 1 <= i; --i)
    if (!in[i]) dfs(i);
  for (int i = 1; i <= n; ++i) sett(in[i], p[i]);
  for (int i = 1; i <= q; ++i)
    if (type[i] == 1) {
      int ans = query(in[qq[i]], out[qq[i]]);
      if (ans) sett(in[inv[ans]], 0);
      printf("%d\n", ans);
    }
  return 0;
}
