#include <bits/stdc++.h>
using namespace std;
const int N = 4e5 + 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], 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];
}
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);
  }
  int last = 0;
  for (int i = 1; i <= n; i++)
    if (find(i) == i) {
      if (last)
        Merge(last, i), last = i;
      else
        last = i;
    }
  dfs(last);
  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], dfn[Q[i].v] + siz[Q[i].v] - 1);
      printf("%d\n", ans.first);
      change(1, 1, n, ans.second, make_pair(0, 0));
    }
  return 0;
}
