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 maxn = 2e5 + 5, N = 3e5 + 5;
struct node {
  int l, r, mx;
} tr[N << 2];
int L[maxn], R[maxn], a[maxn], b[N << 1], c[maxn];
int n, m, q, cnt, ed[N * 3][2];
map<pair<int, int>, int> mp;
inline void build(int now, int l, int r) {
  tr[now].l = l, tr[now].r = r, tr[now].mx = b[l];
  if (l == r) return;
  int mid = (l + r) / 2;
  build(now * 2, l, mid), build(now * 2 + 1, mid + 1, r);
  tr[now].mx = max(tr[now * 2].mx, tr[now * 2 + 1].mx);
}
inline void change(int now, int x) {
  if (tr[now].l == tr[now].r) {
    tr[now].mx = 0;
    return;
  }
  change(now * 2 + (x > tr[now * 2].r), x);
  tr[now].mx = max(tr[now * 2].mx, tr[now * 2 + 1].mx);
}
inline int query(int now, int l, int r) {
  if (tr[now].l == l && tr[now].r == r) return tr[now].mx;
  int mid = tr[now * 2].r;
  if (l > mid) return query(now * 2 + 1, l, r);
  if (r <= mid) return query(now * 2, l, r);
  return max(query(now * 2, l, mid), query(now * 2 + 1, mid + 1, r));
}
vector<int> e[maxn];
int main() {
  scanf("%d%d%d", &n, &m, &q);
  for (int i = (1); i <= (n); i++) {
    scanf("%d", &a[i]);
    c[a[i]] = i;
  }
  for (int i = (1); i <= (m); i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    e[u].push_back(v), e[v].push_back(u), ed[i][0] = u, ed[i][1] = v;
  }
  for (int i = (1); i <= (n); i++) {
    int sz = e[i].size();
    L[i] = cnt + 1;
    for (int j = (0); j <= (sz - 1); j++) {
      int v = e[i][j];
      mp[make_pair(i, v)] = ++cnt, b[cnt] = a[v];
    }
    R[i] = mp[make_pair(i, i)] = ++cnt, b[cnt] = a[i];
  }
  build(1, 1, cnt);
  while (q--) {
    int z, x, y;
    scanf("%d%d", &z, &x);
    if (z == 1) {
      int d = query(1, L[x], R[x]);
      printf("%d\n", d);
      if (d != 0) {
        int u = c[d], sz = e[c[d]].size();
        for (int i = (0); i <= (sz - 1); i++) {
          change(1, mp[make_pair(u, e[u][i])]),
              change(1, mp[make_pair(e[u][i], u)]);
        }
        change(1, mp[make_pair(u, u)]);
      }
    } else {
      int u = ed[x][0], v = ed[x][1];
      change(1, mp[make_pair(u, v)]), change(1, mp[make_pair(v, u)]);
    }
  }
  return 0;
}
