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;
int mod = 1000000007;
int get_min(int a, int b) { return a == -1 ? b : (b == -1 ? a : min(a, b)); }
long long get_min(long long a, long long b) {
  return a == -1 ? b : (b == -1 ? a : min(a, b));
}
int n, m, q;
int dfs_id;
int ans_fa[1200100], fa[1200100], val[1200100];
int u[1200100], v[1200100];
int op[1200100], p[1200100];
int idx;
struct Tree {
  int ls, rs;
  int id;
} tr[1200100];
int min_id[1200100], max_id[1200100], num[1200100];
int f(int t) {
  if (fa[t] != t) fa[t] = f(fa[t]);
  return fa[t];
}
void merge(int a, int b) {
  a = f(a);
  b = f(b);
  if (a == b) return;
  tr[idx].ls = a;
  tr[idx].rs = b;
  fa[a] = idx;
  fa[b] = idx;
  fa[idx] = idx;
  idx++;
  assert(idx < 1200100);
}
void dfs(int t) {
  num[dfs_id] = p[t];
  tr[t].id = dfs_id;
  min_id[dfs_id] = max_id[dfs_id] = dfs_id;
  dfs_id++;
  assert(dfs_id < 1200100);
  if (tr[t].ls == 0) {
    return;
  }
  dfs(tr[t].ls);
  dfs(tr[t].rs);
  max_id[tr[t].id] = max_id[tr[tr[t].rs].id];
}
void build(int t, int l, int r) {
  if (l == r) {
    val[t] = l;
    return;
  }
  int mid = (l + r) >> 1;
  build(t << 1, l, mid);
  build(t << 1 | 1, mid + 1, r);
  val[t] =
      num[val[t << 1]] > num[val[t << 1 | 1]] ? val[t << 1] : val[t << 1 | 1];
}
int find(int t, int l, int r, int ql, int qr) {
  if (ql <= l && qr >= r) {
    return val[t];
  }
  int mid = (l + r) >> 1;
  int lret = 0, rret = 0;
  if (ql <= mid) {
    lret = find(t << 1, l, mid, ql, qr);
  }
  if (qr > mid) {
    rret = find(t << 1 | 1, mid + 1, r, ql, qr);
  }
  return num[lret] > num[rret] ? lret : rret;
}
void update(int t, int l, int r, int pos) {
  if (l == r) {
    val[t] = 0;
    return;
  }
  int mid = (l + r) >> 1;
  if (pos <= mid)
    update(t << 1, l, mid, pos);
  else
    update(t << 1 | 1, mid + 1, r, pos);
  val[t] =
      num[val[t << 1]] > num[val[t << 1 | 1]] ? val[t << 1] : val[t << 1 | 1];
}
int del[1200100];
int main() {
  scanf("%d%d%d", &n, &m, &q);
  for (int i = 1; i < n + 1; ++i) {
    fa[i] = i;
  }
  memset(tr, 0, sizeof(tr));
  for (int i = 1; i < n + 1; ++i) {
    scanf("%d", &p[i]);
  }
  for (int i = 1; i < m + 1; ++i) {
    scanf("%d%d", &u[i], &v[i]);
  }
  for (int i = 0; i < q; ++i) {
    scanf("%d%d", &op[i], &val[i]);
    if (op[i] == 2) {
      del[val[i]] = 1;
    }
  }
  idx = n + 1;
  for (int i = 1; i < m + 1; ++i) {
    if (del[i]) continue;
    merge(u[i], v[i]);
  }
  for (int i = q - 1; i >= 0; --i) {
    if (op[i] == 1) {
      ans_fa[i] = f(val[i]);
    } else {
      merge(u[val[i]], v[val[i]]);
    }
  }
  dfs_id = 1;
  for (int i = 1; i < idx; ++i) {
    if (f(i) == i) {
      dfs(i);
    }
  }
  build(1, 1, idx);
  for (int i = 0; i < q; ++i) {
    if (op[i] == 1) {
      int ans =
          find(1, 1, idx, min_id[tr[ans_fa[i]].id], max_id[tr[ans_fa[i]].id]);
      cout << num[ans] << endl;
      update(1, 1, idx, ans);
    }
  }
}
