#include <bits/stdc++.h>
using namespace std;
const int N = 2e6 + 10;
const int INF = 0x3f3f3f3f;
const int inf = -INF;
const int mod = 1e9 + 7;
const double pi = acos(-1.0);
const double eps = 1e-5;
int n, m, q;
vector<int> g[N];
int a[N], in[N], out[N], f[N];
int tot;
int tree[N], ui[N], vi[N];
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;
  if (x != y) {
    n++;
    f[n] = n;
    f[x] = n;
    f[y] = n;
    g[n].push_back(x);
    g[n].push_back(y);
  }
}
void dfs(int u) {
  in[u] = ++tot;
  for (int i = 0; i < g[u].size(); i++) {
    int v = g[u][i];
    if (in[v]) continue;
    dfs(v);
  }
  out[u] = tot;
}
void up(int root) { tree[root] = max(tree[root << 1], tree[root << 1 | 1]); }
void build(int pos, int c, int i, int l, int r) {
  if (l == r) {
    tree[i] = c;
    return;
  }
  int mid = l + r >> 1;
  if (pos <= mid)
    build(pos, c, i << 1, l, mid);
  else
    build(pos, c, i << 1 | 1, mid + 1, r);
  up(i);
}
int query(int L, int R, int i, int l, int r) {
  if (L <= l && r <= R) return tree[i];
  int res = 0;
  int mid = l + r >> 1;
  if (L <= mid) {
    res = max(res, query(L, R, i << 1, l, mid));
  }
  if (R > mid) res = max(res, query(L, R, i << 1 | 1, mid + 1, r));
  return res;
}
int pos[N], op[N], x[N], del[N];
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", &ui[i], &vi[i]);
  for (int i = 1; i <= q; i++) {
    scanf("%d%d", &op[i], &x[i]);
    if (op[i] == 2) del[x[i]] = 1;
  }
  for (int i = 1; i <= m; i++)
    if (!del[i]) merge(ui[i], vi[i]);
  for (int i = q; i >= 1; i--) {
    if (op[i] == 1)
      x[i] = Find(x[i]);
    else
      merge(ui[x[i]], vi[x[i]]);
  }
  for (int i = 1; i <= n; i++)
    if (f[i] == i) dfs(i);
  for (int i = 1; i <= n; i++) build(in[i], a[i], 1, 1, n);
  for (int i = 1; i <= q; i++) {
    if (op[i] == 1) {
      int ans = query(in[x[i]], out[x[i]], 1, 1, n);
      printf("%d\n", ans);
      if (ans) build(in[pos[ans]], 0, 1, 1, n);
    }
  }
  return 0;
}
