#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int M = 2e6 + 6;
const int inf = 0x3f3f3f3f;
const long long INF = 1e18;
int a[M], pos[M], op[M], b[M], del[M], f[M], ind[M], outd[M], U[M], V[M],
    tr[M << 2];
vector<int> g[M];
int n, m, q, cnt;
int Find(int x) { return x == f[x] ? x : f[x] = Find(f[x]); }
void Merge(int x, int y) {
  x = Find(x), y = Find(y);
  if (x == y) return;
  n++;
  f[n] = n;
  f[x] = n, f[y] = n;
  g[n].push_back(x), g[n].push_back(y);
}
void dfs(int u) {
  ind[u] = ++cnt;
  for (auto v : g[u]) {
    if (ind[v]) continue;
    dfs(v);
  }
  outd[u] = cnt;
}
void up(int root) { tr[root] = max(tr[root << 1], tr[root << 1 | 1]); }
void update(int pos, int c, int root, int l, int r) {
  if (l == r) {
    tr[root] = c;
    return;
  }
  int midd = (l + r) >> 1;
  if (pos <= midd)
    update(pos, c, root << 1, l, midd);
  else
    update(pos, c, root << 1 | 1, midd + 1, r);
  up(root);
}
int query(int L, int R, int root, int l, int r) {
  if (L <= l && r <= R) return tr[root];
  int res = 0;
  int midd = (l + r) >> 1;
  if (L <= midd) res = query(L, R, root << 1, l, midd);
  if (R > midd) res = max(res, query(L, R, root << 1 | 1, midd + 1, r));
  return res;
}
int main() {
  scanf("%d%d%d", &n, &m, &q);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]), pos[a[i]] = i, f[i] = i;
  for (int i = 1; i <= m; i++) scanf("%d%d", &U[i], &V[i]);
  for (int i = 1; i <= q; i++) {
    scanf("%d%d", &op[i], &b[i]);
    if (op[i] == 2) del[b[i]] = 1;
  }
  for (int i = 1; i <= m; i++) {
    if (!del[i]) Merge(U[i], V[i]);
  }
  for (int i = q; i >= 1; i--) {
    if (op[i] == 1)
      b[i] = Find(b[i]);
    else
      Merge(U[b[i]], V[b[i]]);
  }
  for (int i = 1; i <= n; i++)
    if (f[i] == i) dfs(i);
  for (int i = 1; i <= n; i++) update(ind[i], a[i], 1, 1, n);
  for (int i = 1; i <= q; i++) {
    if (op[i] == 1) {
      int ans = query(ind[b[i]], outd[b[i]], 1, 1, n);
      printf("%d\n", ans);
      if (ans) update(ind[pos[ans]], 0, 1, 1, n);
    }
  }
  return 0;
}
