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;
using ll = long long;
using pii = pair<int, int>;
using db = double;
using vi = vector<int>;
const int inf = 0x3f3f3f3f;
const db eps = 1e-8;
const int mod = 1e9 + 7;
ll qpow(ll a, ll b) {
  ll ret = 1;
  while (b) {
    if (b & 1) ret = ret * a % mod;
    a = a * a % mod;
    b >>= 1;
  }
  return ret;
}
const int maxn = 1e6 + 7;
int p[maxn];
struct Edge {
  int u, v;
} edge[maxn];
struct Q {
  int tp, x;
};
int fa[maxn];
int find(int x) { return x == fa[x] ? x : fa[x] = find(fa[x]); }
int tot;
vi G[maxn];
void Union(int x, int y) {
  x = find(x), y = find(y);
  if (x == y) return;
  tot++;
  fa[x] = tot;
  fa[y] = tot;
  G[tot].push_back(x);
  G[tot].push_back(y);
}
int in[maxn], out[maxn];
int ti;
void dfs(int u, int fa = -1) {
  in[u] = ++ti;
  for (auto v : G[u]) {
    if (v != fa) dfs(v, u);
  }
  out[u] = ti;
}
pii mx[maxn << 2];
void update(int l, int r, int rt, int p, int v) {
  if (l == r) {
    mx[rt] = make_pair(v, p);
    return;
  }
  int mid = l + r >> 1;
  if (p <= mid)
    update(l, mid, rt << 1, p, v);
  else
    update(mid + 1, r, rt << 1 | 1, p, v);
  mx[rt] = max(mx[rt << 1], mx[rt << 1 | 1]);
}
pii query(int l, int r, int rt, int L, int R) {
  if (L <= l && r <= R) return mx[rt];
  pii ret = {0, 0};
  int mid = l + r >> 1;
  if (L <= mid) ret = max(ret, query(l, mid, rt << 1, L, R));
  if (R > mid) ret = max(ret, query(mid + 1, r, rt << 1 | 1, L, R));
  ;
  return ret;
}
int ed[maxn];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n, m, q;
  cin >> n >> m >> q;
  for (int i = 1; i <= n + m + q; ++i) fa[i] = i;
  tot = n;
  for (int i = 1; i <= n; ++i) cin >> p[i];
  for (int i = 1; i <= m; ++i) cin >> edge[i].u >> edge[i].v, ed[i] = q;
  vector<Q> que(q);
  for (int i = 0; i < q; ++i) {
    int tp, x;
    cin >> tp >> x;
    if (tp == 2) ed[x] = i;
    que[i] = {tp, x};
  }
  for (int i = 1; i <= m; ++i) {
    if (ed[i] == q) Union(edge[i].u, edge[i].v);
  }
  for (int i = q - 1; i >= 0; --i) {
    int x = que[i].x;
    if (que[i].tp == 2)
      Union(edge[x].u, edge[x].v);
    else {
      que[i].x = find(que[i].x);
    }
  }
  for (int i = 1; i <= tot; ++i)
    if (find(i) == i) dfs(i);
  for (int i = 1; i <= n; ++i) update(1, tot, 1, in[i], p[i]);
  for (int i = 0; i < q; ++i) {
    if (que[i].tp == 1) {
      int x = que[i].x;
      auto tar = query(1, tot, 1, in[x], out[x]);
      cout << tar.first << "\n";
      update(1, tot, 1, tar.second, 0);
    }
  }
  return 0;
}
