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>
template <class T>
inline void rd(T &x) {
  char c = getchar(), f = 0;
  x = 0;
  while (!isdigit(c)) f = (c == '-'), c = getchar();
  while (isdigit(c)) x = x * 10 + c - '0', c = getchar();
  x = f ? -x : x;
}
const int MAXN = 1e6 + 7;
int fa[MAXN], dfn[MAXN], sz[MAXN], f[MAXN][22], ans[MAXN], pos[MAXN];
std::vector<int> son[MAXN];
int p[MAXN], n, m, tim[MAXN], q, seq[MAXN], wei[MAXN], tot;
std::pair<int, int> E[MAXN], Q[MAXN];
int cmax(int x, int y) {
  return p[x] == p[y] ? (x < y ? x : y) : (p[x] > p[y] ? x : y);
}
struct Node {
  int l, r;
  Node *lc, *rc;
  int max;
  Node() {}
  Node(int l, int r, Node *lc, Node *rc) : l(l), r(r), lc(lc), rc(rc) {}
  static Node *build(int l, int r) {
    Node *ret;
    if (l == r) {
      ret = new Node(l, r, 0, 0);
      ret->max = pos[l];
    } else {
      ret = new Node(l, r, build(l, (l + (r - l) / 2)),
                     build((l + (r - l) / 2) + 1, r));
      ret->up();
    }
    return ret;
  }
  void up() { max = cmax(lc->max, rc->max); }
  void change(int p, int x) {
    if (l == r) {
      ::p[pos[l]] = x;
      max = pos[l];
      return;
    }
    if (p <= (l + (r - l) / 2))
      lc->change(p, x);
    else
      rc->change(p, x);
    up();
  }
  int query(int L, int R) {
    if (l == L && r == R) return max;
    if (R <= (l + (r - l) / 2))
      return lc->query(L, R);
    else if (L > (l + (r - l) / 2))
      return rc->query(L, R);
    else
      return cmax(lc->query(L, (l + (r - l) / 2)),
                  rc->query((l + (r - l) / 2) + 1, R));
  }
} * root;
bool cmp(int a, int b) { return tim[a] > tim[b]; }
inline int find(int x) { return fa[x] == x ? x : fa[x] = find(fa[x]); }
void dfs(int u) {
  static int ts = 0;
  dfn[u] = ++ts;
  pos[ts] = u;
  sz[u] = 1;
  for (auto v : son[u]) dfs(v), sz[u] += sz[v], f[v][0] = u;
}
int get(int u, int val) {
  for (int i = (21); i >= (0); --i) {
    if (f[u][i] && wei[f[u][i]] >= val) u = f[u][i];
  }
  return u;
}
int main() {
  memset(ans, -1, sizeof ans);
  rd(n), rd(m), rd(q);
  for (int i = (1); i <= (n); ++i) rd(p[i]), wei[i] = q + 1;
  for (int i = (1); i <= (2 * n + 5); ++i) fa[i] = i;
  for (int i = (1); i <= (m); ++i) {
    rd(E[i].first);
    rd(E[i].second);
    tim[i] = q + 1;
    seq[i] = i;
  }
  for (int i = (1); i <= (q); ++i) rd(Q[i].first), rd(Q[i].second);
  for (int i = (1); i <= (q); ++i) {
    if (Q[i].first == 2) tim[Q[i].second] = i;
  }
  std::sort(seq + 1, seq + m + 1, cmp);
  tot = n;
  for (int i = (1); i <= (m); ++i) {
    int u = E[seq[i]].first, v = E[seq[i]].second, tt = tim[seq[i]];
    if (find(u) == find(v)) continue;
    wei[++tot] = tt;
    u = find(u), v = find(v);
    son[tot].push_back(u), son[tot].push_back(v);
    fa[u] = fa[v] = tot;
  }
  for (int i = (tot); i >= (1); --i)
    if (!dfn[i]) dfs(i);
  root = Node::build(1, tot);
  for (int j = (1); j <= (21); ++j)
    for (int i = (1); i <= (n); ++i) f[i][j] = f[f[i][j - 1]][j - 1];
  for (int i = (1); i <= (q); ++i) {
    if (Q[i].first == 1) {
      int v = get(Q[i].second, i);
      int tmp = root->query(dfn[v], dfn[v] + sz[v] - 1);
      ans[i] = p[tmp];
      if (ans[i]) root->change(dfn[tmp], 0);
    }
  }
  for (int i = (1); i <= (q); ++i)
    if (ans[i] != -1) printf("%d\n", ans[i]);
  return 0;
}
