#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int N = 5e5 + 5;
const int M = 7e5 + 5;
int p[M], fa[M], id[M];
int u[N], v[N], vis[N], op[N][2];
vector<int> G[M];
int fid(int x) { return fa[x] == x ? x : fa[x] = fid(fa[x]); }
int in[M], out[M], cnt, pos[M];
void dfs(int x) {
  in[x] = ++cnt;
  pos[cnt] = x;
  for (int i : G[x]) {
    dfs(i);
  }
  out[x] = cnt;
}
struct node {
  int x, id;
} tree[M << 2];
void pushup(int root) {
  if (tree[root << 1].x > tree[root << 1 | 1].x)
    tree[root] = tree[root << 1];
  else
    tree[root] = tree[root << 1 | 1];
}
void build(int root, int l, int r) {
  if (l == r) {
    tree[root].x = p[pos[l]];
    tree[root].id = l;
    return;
  }
  int mid = (l + r) >> 1;
  build(root << 1, l, mid);
  build(root << 1 | 1, mid + 1, r);
  pushup(root);
}
void update(int root, int l, int r, int po) {
  if (l == r) {
    tree[root].x = 0;
    return;
  }
  int mid = (l + r) >> 1;
  if (po <= mid)
    update(root << 1, l, mid, po);
  else
    update(root << 1 | 1, mid + 1, r, po);
  pushup(root);
}
node query(int root, int l, int r, int L, int R) {
  if (L <= l && r <= R) {
    return tree[root];
  }
  int mid = (l + r) >> 1;
  node tmp1, tmp2;
  tmp1.x = tmp2.x = 0;
  if (L <= mid) tmp1 = query(root << 1, l, mid, L, R);
  if (R > mid) tmp2 = query(root << 1 | 1, mid + 1, r, L, R);
  if (tmp1.x > tmp2.x) return tmp1;
  return tmp2;
}
int main() {
  int n, m, q;
  scanf("%d%d%d", &n, &m, &q);
  for (int i = 1; i <= n; i++) {
    fa[i] = i;
    scanf("%d", &p[i]);
  }
  for (int i = 1; i <= m; i++) {
    scanf("%d%d", &u[i], &v[i]);
  }
  for (int i = 1; i <= q; i++) {
    fa[n + i] = n + i;
    scanf("%d%d", &op[i][0], &op[i][1]);
    if (op[i][0] == 2) {
      vis[op[i][1]] = 1;
    }
  }
  for (int i = 1; i <= m; i++) {
    if (vis[i]) continue;
    int uu = fid(u[i]), vv = fid(v[i]);
    if (uu == vv) continue;
    fa[uu] = vv;
    G[vv].push_back(uu);
  }
  for (int i = q; i > 0; i--) {
    int x = op[i][1];
    if (op[i][0] == 1) {
      id[i] = fid(x);
      continue;
    }
    int uu = fid(u[x]), vv = fid(v[x]);
    if (uu != vv) {
      n++;
      fa[uu] = fa[vv] = n;
      G[n].push_back(uu);
      G[n].push_back(vv);
    }
  }
  for (int i = 1; i <= n; i++) {
    if (in[i]) continue;
    dfs(fid(i));
  }
  build(1, 1, cnt);
  for (int i = 1; i <= q; i++) {
    if (op[i][0] == 2) continue;
    node maxx = query(1, 1, cnt, in[id[i]], out[id[i]]);
    if (maxx.x > 0) update(1, 1, cnt, maxx.id);
    printf("%d\n", maxx.x);
  }
  return 0;
}
