#include <bits/stdc++.h>
template <typename T>
inline void read(T &x) {
  x = 0;
  char c = getchar();
  while (!isdigit(c)) c = getchar();
  while (isdigit(c)) x = x * 10 + (c ^ 48), c = getchar();
}
using namespace std;
int n, m, q;
int vl[501000];
struct Edge {
  int u, v;
} E[501000];
struct queries {
  int t, p;
} Que[501000];
bool vis[501000];
struct edge {
  int nxt, to;
} e[501000 << 1];
int head[501000], ecnt;
inline void addedge(int from, int to) {
  e[++ecnt] = (edge){head[from], to};
  head[from] = ecnt;
}
int fath[501000], ptot;
int find(int cur) {
  return fath[cur] == cur ? cur : fath[cur] = find(fath[cur]);
}
inline void merge(int u, int v) {
  u = find(u), v = find(v);
  if (u == v) return;
  ++ptot;
  fath[u] = fath[v] = fath[ptot] = ptot;
  addedge(ptot, u), addedge(ptot, v);
}
int anc[501000];
int dfn[501000], siz[501000], dcnt, dedfn[501000];
void dfs(int cur) {
  if (cur <= n) {
    siz[cur] = 1;
    dfn[cur] = ++dcnt;
    dedfn[dcnt] = cur;
    return;
  }
  dfn[cur] = dcnt + 1;
  for (int i = head[cur]; i; i = e[i].nxt) {
    int to = e[i].to;
    dfs(to);
    siz[cur] += siz[to];
  }
}
int ls[801000], rs[801000], ttot, root;
pair<int, int> val[801000];
inline void pushup(int cur) { val[cur] = max(val[ls[cur]], val[rs[cur]]); }
void build(int L, int R, int &cur) {
  cur = ++ttot;
  if (L == R) return val[cur] = make_pair(vl[dedfn[L]], L), void();
  int mid = (L + R) >> 1;
  build(L, mid, ls[cur]), build(mid + 1, R, rs[cur]);
  pushup(cur);
}
pair<int, int> query(int L, int R, int l, int r, int cur) {
  if (l <= L && R <= r) return val[cur];
  int mid = (L + R) >> 1;
  if (l <= mid && r > mid)
    return max(query(L, mid, l, r, ls[cur]), query(mid + 1, R, l, r, rs[cur]));
  if (l <= mid) return query(L, mid, l, r, ls[cur]);
  return query(mid + 1, R, l, r, rs[cur]);
}
void modify(int L, int R, int pos, int cur) {
  if (L == R) return val[cur] = make_pair(0, L), void();
  int mid = (L + R) >> 1;
  if (pos <= mid)
    modify(L, mid, pos, ls[cur]);
  else
    modify(mid + 1, R, pos, rs[cur]);
  pushup(cur);
}
int main() {
  read(n), read(m), read(q);
  for (int i = 1; i <= n; ++i) read(vl[i]);
  for (int i = 1; i <= m; ++i) {
    int u, v;
    read(u), read(v);
    E[i] = (Edge){u, v};
  }
  for (int i = 1; i <= q; ++i) {
    int t, p;
    read(t), read(p);
    Que[i] = (queries){t, p};
    if (t == 2) vis[p] = true;
  }
  for (int i = 1; i <= n; ++i) fath[i] = i;
  ptot = n;
  for (int i = 1; i <= m; ++i)
    if (!vis[i]) merge(E[i].u, E[i].v);
  for (int i = q; i; --i) {
    int t = Que[i].t, p = Que[i].p;
    if (t == 1) {
      anc[i] = find(p);
    } else {
      int u = E[p].u, v = E[p].v;
      merge(u, v);
    }
  }
  int lst = 0;
  for (int i = 1; i <= ptot; ++i)
    if (fath[i] == i) {
      if (lst)
        merge(i, lst), lst = ptot;
      else
        lst = i;
    }
  dfs(lst);
  build(1, n, root);
  for (int i = 1; i <= q; ++i) {
    if (Que[i].t == 1) {
      pair<int, int> pr =
          query(1, n, dfn[anc[i]], dfn[anc[i]] + siz[anc[i]] - 1, root);
      printf("%d\n", pr.first);
      modify(1, n, pr.second, root);
    }
  }
  return 0;
}
