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 = 5e5 + 9, M = 5e6 + 9, QQ = 5e6 + 9;
struct Tree {
  pair<int, int> val;
} tr[N << 2];
struct Query {
  int v, op;
} Q[QQ];
struct Eage {
  int x, y;
} e[M];
int n, m, q, a[N], dep[N];
int fa[N], siz[N], dfn[N], dfout[N], ind;
vector<int> G[N];
bool vis[M];
int find(int x) { return fa[x] == x ? x : fa[x] = find(fa[x]); }
void dfs(int u) {
  dfn[u] = ++ind;
  siz[u] = 1;
  for (auto v : G[u]) dfs(v), siz[u] += siz[v];
  dfout[u] = ind;
}
void change(int x, int l, int r, int pos, pair<int, int> v) {
  if (l == r) {
    tr[x].val = v;
    return;
  }
  int mid = (l + r) >> 1;
  if (pos <= mid)
    change((x << 1), l, mid, pos, v);
  else
    change((x << 1 | 1), mid + 1, r, pos, v);
  tr[x].val = max(tr[(x << 1)].val, tr[(x << 1 | 1)].val);
}
pair<int, int> query(int x, int l, int r, int L, int R) {
  if (L <= l && r <= R) return tr[x].val;
  int mid = (l + r) >> 1;
  pair<int, int> res = make_pair(0, 0);
  if (L <= mid) res = max(res, query((x << 1), l, mid, L, R));
  if (R > mid) res = max(res, query((x << 1 | 1), mid + 1, r, L, R));
  return res;
}
inline void Merge(int x, int y) {
  int fx = find(x), fy = find(y);
  if (fx == fy) return;
  fa[fx] = fa[fy] = ++n;
  fa[n] = n;
  G[n].push_back(fx);
  G[n].push_back(fy);
}
int main() {
  scanf("%d%d%d", &n, &m, &q);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]), fa[i] = i, dep[i] = 1;
  for (int i = 1; i <= m; i++) scanf("%d%d", &e[i].x, &e[i].y);
  for (int i = 1; i <= q; i++) {
    scanf("%d%d", &Q[i].op, &Q[i].v);
    if (Q[i].op == 2) vis[Q[i].v] = true;
  }
  for (int i = 1; i <= m; i++)
    if (!vis[i]) Merge(e[i].x, e[i].y);
  for (int i = q; i >= 1; i--) {
    if (Q[i].op == 1)
      Q[i].v = find(Q[i].v);
    else
      Merge(e[Q[i].v].x, e[Q[i].v].y);
  }
  for (int i = 1; i <= n; i++)
    if (find(i) == i) {
      dfs(i);
    }
  for (int i = 1; i <= n; i++) change(1, 1, n, dfn[i], make_pair(a[i], dfn[i]));
  for (int i = 1; i <= q; i++)
    if (Q[i].op == 1) {
      pair<int, int> ans = query(1, 1, n, dfn[Q[i].v], dfout[Q[i].v]);
      printf("%d\n", ans.first);
      change(1, 1, n, ans.second, make_pair(0, 0));
    }
  return 0;
}
