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;
const int N = 7e5 + 10;
struct YEDGE {
  int x, y;
  int tim;
} yedge[N];
int val[N], tim[N], ch[N][2];
int id[N], fid[N], ddcnt, siz[N];
queue<pair<int, int> > qu;
stack<int> st;
int n, m, q, f[N], dcnt, fa[N][20];
int find(int x) { return f[x] == x ? x : f[x] = find(f[x]); }
void dfs(int x, int f) {
  fa[x][0] = f, id[x] = ++ddcnt, fid[ddcnt] = x, siz[x] = 1;
  if (ch[x][0]) dfs(ch[x][0], x);
  siz[x] += siz[ch[x][0]];
  if (ch[x][1]) dfs(ch[x][1], x);
  siz[x] += siz[ch[x][0]];
}
int maxx[N << 2];
void build(int rt, int l, int r) {
  if (l == r) {
    maxx[rt] = val[fid[l]];
    return;
  }
  int mid = (l + r) >> 1;
  build(rt << 1, l, mid);
  build(rt << 1 | 1, mid + 1, r);
  maxx[rt] = max(maxx[rt << 1], maxx[rt << 1 | 1]);
}
void prepare() {
  for (int i = 1; i <= 20; i++) {
    for (int j = 1; j <= dcnt; j++) {
      fa[j][i] = fa[fa[j][i - 1]][i - 1];
    }
  }
}
int query(int rt, int lb, int rb, int l, int r) {
  if (lb <= l && r <= rb) {
    return maxx[rt];
  }
  int mid = (l + r) >> 1, a1 = 0;
  if (lb <= mid) {
    a1 = query(rt << 1, lb, rb, l, mid);
  }
  if (rb > mid) {
    a1 = max(a1, query(rt << 1 | 1, lb, rb, mid + 1, r));
  }
  return a1;
}
void change(int rt, int vall, int l, int r) {
  if (l == r) {
    maxx[rt] = 0;
    return;
  }
  int mid = (l + r) >> 1;
  if (maxx[rt << 1] == vall)
    change(rt << 1, vall, l, mid);
  else
    change(rt << 1 | 1, vall, mid + 1, r);
  maxx[rt] = max(maxx[rt << 1], maxx[rt << 1 | 1]);
}
int main() {
  scanf("%d%d%d", &n, &m, &q);
  for (int i = 1; i <= n; i++) scanf("%d", &val[i]), tim[i] = q;
  for (int i = 1; i <= m; i++) {
    scanf("%d%d", &yedge[i].x, &yedge[i].y);
    yedge[i].tim = q;
  }
  for (int i = 1; i <= q; i++) {
    int flag, x;
    scanf("%d%d", &flag, &x);
    if (flag == 1) {
      qu.push(make_pair(x, i));
    } else {
      st.push(x), yedge[x].tim = i;
    }
  }
  for (int i = 1; i <= n + m; i++) f[i] = i;
  dcnt = n;
  for (int i = 1; i <= m; i++) {
    if (yedge[i].tim != q) continue;
    int x = yedge[i].x, y = yedge[i].y;
    x = find(x), y = find(y), ++dcnt;
    fa[x][0] = fa[y][0] = f[x] = f[y] = dcnt;
    ch[dcnt][0] = x, ch[dcnt][1] = y;
    if (x == y) ch[dcnt][1] = 0;
    tim[dcnt] = q;
  }
  while (!st.empty()) {
    int i = st.top();
    st.pop();
    int x = yedge[i].x, y = yedge[i].y;
    x = find(x), y = find(y), ++dcnt;
    fa[x][0] = fa[y][0] = f[x] = f[y] = dcnt;
    ch[dcnt][0] = x, ch[dcnt][1] = y;
    if (x == y) ch[dcnt][1] = 0;
    tim[dcnt] = yedge[i].tim;
  }
  for (int i = dcnt; i; i--) {
    if (!siz[i]) dfs(i, 0);
  }
  build(1, 1, ddcnt);
  prepare();
  while (!qu.empty()) {
    int x = qu.front().first, timx = qu.front().second;
    qu.pop();
    int fx = x;
    for (int i = 20; i >= 0; i--) {
      if (tim[fa[fx][i]] >= timx) {
        fx = fa[fx][i];
      }
    }
    int nans = query(1, id[fx], id[fx] + siz[fx] - 1, 1, ddcnt);
    printf("%d\n", nans);
    change(1, nans, 1, ddcnt);
  }
  return 0;
}
