#include <bits/stdc++.h>
using namespace std;
int Read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (isdigit(ch)) {
    x = (x << 3) + (x << 1) + ch - '0';
    ch = getchar();
  }
  return x * f;
}
int first[800005], nxt[800005], to[800005], tot = 0;
void Add(int x, int y) {
  nxt[++tot] = first[x];
  first[x] = tot;
  to[tot] = y;
}
int ex[500005], ey[500005], vis[500005], rt[500005], tag[500005];
int sz[500005], bh[500005], a[500005], opt[500005], x[500005], vvis[500005],
    maxn[500005], minn[500005];
int L[500005], R[500005], rev[500005], mx[2000005], Pos[2000005];
void pushup(int o) {
  if (mx[o << 1] > mx[o << 1 | 1])
    mx[o] = mx[o << 1], Pos[o] = Pos[o << 1];
  else
    mx[o] = mx[o << 1 | 1], Pos[o] = Pos[o << 1 | 1];
}
void build(int o, int l, int r) {
  if (l == r) {
    mx[o] = a[rev[l]];
    Pos[o] = l;
    return;
  }
  int mid = (l + r) >> 1;
  build(o << 1, l, mid);
  build(o << 1 | 1, mid + 1, r);
  pushup(o);
}
void modify(int o, int l, int r, int pos, int val) {
  if (l == r) {
    mx[o] = val;
    return;
  }
  int mid = (l + r) >> 1;
  if (pos <= mid)
    modify(o << 1, l, mid, pos, val);
  else
    modify(o << 1 | 1, mid + 1, r, pos, val);
  pushup(o);
}
pair<int, int> my_max(pair<int, int> A, pair<int, int> B) {
  return (A.first > B.first) ? A : B;
}
pair<int, int> query(int o, int l, int r, int nl, int nr) {
  if (nl <= l && r <= nr) return make_pair(mx[o], Pos[o]);
  int mid = (l + r) >> 1;
  pair<int, int> ans;
  ans.first = ans.second = 0;
  if (nl <= mid) ans = my_max(ans, query(o << 1, l, mid, nl, nr));
  if (mid < nr) ans = my_max(ans, query(o << 1 | 1, mid + 1, r, nl, nr));
  return ans;
}
int findfa(int x) { return rt[x] == x ? x : rt[x] = findfa(rt[x]); }
void dfs(int u) {
  vvis[u] = 1;
  bh[u] += tag[u];
  for (int e = first[u]; e; e = nxt[e]) {
    int v = to[e];
    tag[v] += tag[u];
    dfs(v);
  }
}
signed main() {
  int n = Read(), m = Read(), q = Read();
  for (int i = 1; i <= n; i++) sz[i] = bh[i] = 1, rt[i] = i, a[i] = Read();
  for (int i = 1; i <= m; i++) ex[i] = Read(), ey[i] = Read();
  for (int i = 1; i <= q; i++) {
    opt[i] = Read(), x[i] = Read();
    if (opt[i] == 2) vis[x[i]] = 1;
  }
  for (int i = 1; i <= m; i++) {
    if (!vis[i]) {
      int fx = findfa(ex[i]), fy = findfa(ey[i]);
      if (fx == fy) continue;
      tag[fx] += sz[fy];
      sz[fy] += sz[fx];
      rt[fx] = fy;
      Add(fy, fx);
    }
  }
  for (int i = q; i >= 1; i--) {
    if (opt[i] == 2) {
      int fx = findfa(ex[x[i]]), fy = findfa(ey[x[i]]);
      if (fx == fy) continue;
      tag[fx] += sz[fy];
      sz[fy] += sz[fx];
      rt[fx] = fy;
      Add(fy, fx);
    }
  }
  int sum = 0;
  for (int i = 1; i <= n; i++)
    if (!vvis[findfa(i)]) tag[rt[i]] += sum, sum += sz[rt[i]], dfs(rt[i]);
  for (int i = 1; i <= n; i++)
    maxn[i] = minn[i] = bh[i], rt[i] = i, rev[bh[i]] = i;
  for (int i = 1; i <= m; i++) {
    if (!vis[i]) {
      int fx = findfa(ex[i]), fy = findfa(ey[i]);
      if (fx == fy) continue;
      maxn[fy] = max(maxn[fy], maxn[fx]);
      minn[fy] = min(minn[fy], minn[fx]);
      rt[fx] = fy;
    }
  }
  for (int i = q; i >= 1; i--) {
    if (opt[i] == 2) {
      int fx = findfa(ex[x[i]]), fy = findfa(ey[x[i]]);
      if (fx == fy) continue;
      maxn[fy] = max(maxn[fy], maxn[fx]);
      minn[fy] = min(minn[fy], minn[fx]);
      rt[fx] = fy;
    }
    if (opt[i] == 1) L[i] = minn[findfa(x[i])], R[i] = maxn[findfa(x[i])];
  }
  build(1, 1, n);
  for (int i = 1; i <= q; i++) {
    if (opt[i] == 1) {
      pair<int, int> tmp = query(1, 1, n, L[i], R[i]);
      printf("%d\n", tmp.first);
      modify(1, 1, n, tmp.second, 0);
    }
  }
  return 0;
}
