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;
template <typename T>
void chmin(T &x, const T &y) {
  if (x > y) x = y;
}
template <typename T>
void chmax(T &x, const T &y) {
  if (x < y) x = y;
}
int read() {
  char c;
  while ((c = getchar()) < '-')
    ;
  if (c == '-') {
    int x = (c = getchar()) - '0';
    while ((c = getchar()) >= '0') x = x * 10 + c - '0';
    return -x;
  }
  int x = c - '0';
  while ((c = getchar()) >= '0') x = x * 10 + c - '0';
  return x;
}
const int N = 4e5 + 5, M = 3e5 + 5, Q = 5e5 + 5;
int p[N], fa[N];
int find(int x) { return x == fa[x] ? x : fa[x] = find(fa[x]); }
pair<int, int> e[M];
bool mark[M];
struct Query {
  int ty, v;
} query[Q];
namespace TREE {
int lk[N][2], n, dfn[N], en[N];
int tot;
void dfs(int x) {
  if (!lk[x][0]) {
    dfn[x] = en[x] = ++tot;
    return;
  }
  dfn[x] = tot + 1;
  for (int i = 0; i <= 1; ++i) dfs(lk[x][i]);
  en[x] = tot;
}
void init() {
  for (int i = 1; i <= n; ++i)
    if (fa[i] == i) dfs(i);
}
};  // namespace TREE
namespace SEG {
int mx[N * 3], n, d;
void init(int _n) {
  n = _n;
  for (d = 1; d < n; d <<= 1)
    ;
  --d;
  for (int i = 1; i <= n; ++i) mx[d + TREE::dfn[i]] = p[i];
  for (int i = (n + d) / 2; i >= 1; --i) mx[i] = max(mx[i * 2], mx[i * 2 + 1]);
}
int query(int l, int r) {
  l += d;
  r += d;
  int ans = l;
  if (l < r) {
    auto C = [&](int x) {
      if (mx[x] > mx[ans]) ans = x;
    };
    C(r);
    while (l + 1 != r) {
      if (l % 2 == 0) C(l + 1);
      if (r % 2) C(r - 1);
      l >>= 1;
      r >>= 1;
    }
    while (ans <= d) ans = mx[ans * 2] == mx[ans] ? ans * 2 : ans * 2 + 1;
  }
  int tmp = mx[ans];
  mx[ans] = 0;
  for (int i = ans; i >>= 1;) mx[i] = max(mx[i * 2], mx[i * 2 + 1]);
  return tmp;
}
};  // namespace SEG
void merge(const pair<int, int> &e) {
  int x = find(e.first), y = find(e.second);
  if (x != y) {
    fa[x] = fa[y] = ++TREE::n;
    TREE::lk[TREE::n][0] = x;
    TREE::lk[TREE::n][1] = y;
  }
}
int main() {
  int n, m, q;
  cin >> n >> m >> q;
  for (int i = 1; i <= n; ++i) p[i] = read();
  for (int i = 1; i <= m; ++i) e[i] = pair<int, int>(read(), read());
  for (int i = 1; i <= n * 2; ++i) fa[i] = i;
  for (int i = 1; i <= q; ++i) {
    query[i].ty = read();
    query[i].v = read();
    if (query[i].ty == 2) mark[query[i].v] = 1;
  }
  TREE::n = n;
  for (int i = 1; i <= m; ++i)
    if (!mark[i]) merge(e[i]);
  for (int i = q; i >= 1; --i) {
    if (query[i].ty == 1)
      query[i].v = find(query[i].v);
    else
      merge(e[query[i].v]);
  }
  TREE::init();
  SEG::init(n);
  for (int i = 1; i <= q; ++i)
    if (query[i].ty == 1) {
      int v = query[i].v;
      printf("%d\n", SEG::query(TREE::dfn[v], TREE::en[v]));
    }
}
