#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 7, inf = 0x3f3f3f3f, mod = 1e9 + 7;
int tot, fa[maxn];
pair<int, int> mx[maxn << 2];
struct edge {
  int u, v;
};
struct query {
  int op, val;
};
void upd(int p, int v, int l = 1, int r = tot, int rt = 1) {
  if (l == r) {
    mx[rt] = make_pair(v, p);
    return;
  }
  int mid = l + r >> 1;
  if (p <= mid)
    upd(p, v, l, mid, rt << 1);
  else
    upd(p, v, mid + 1, r, rt << 1 | 1);
  mx[rt] = max(mx[rt << 1], mx[rt << 1 | 1]);
}
pair<int, int> ask(int ql, int qr, int l = 1, int r = tot, int rt = 1) {
  if (ql <= l && r <= qr) return mx[rt];
  pair<int, int> res{0, 0};
  int mid = l + r >> 1;
  if (ql <= mid) res = max(res, ask(ql, qr, l, mid, rt << 1));
  if (qr > mid) res = max(res, ask(ql, qr, mid + 1, r, rt << 1 | 1));
  return res;
}
vector<int> g[maxn];
int find(int x) { return fa[x] == x ? x : fa[x] = find(fa[x]); }
void merge(int x, int y) {
  x = find(x), y = find(y);
  if (x == y) return;
  ++tot;
  fa[x] = tot;
  fa[y] = tot;
  g[tot].push_back(x);
  g[tot].push_back(y);
}
int st[maxn], ed[maxn], t = 0, out[maxn], v, p[maxn];
void dfs(int u, int fa) {
  st[u] = ++t;
  for (auto &v : g[u]) {
    if (v == fa) continue;
    dfs(v, u);
  }
  ed[u] = t;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n, m, q;
  cin >> n >> m >> q;
  tot = n;
  for (int i = 1; i <= n + m + q; ++i) fa[i] = i;
  for (int i = 1; i <= n; ++i) cin >> p[i];
  vector<edge> e(m + 1);
  for (int i = 1; i <= m; ++i) {
    cin >> e[i].u >> e[i].v;
    out[i] = q;
  }
  vector<query> qq(q);
  for (int i = 0; i < q; ++i) {
    cin >> qq[i].op >> qq[i].val;
    if (qq[i].op == 2) out[qq[i].val] = i;
  }
  for (int i = 1; i <= m; ++i)
    if (out[i] == q) merge(e[i].u, e[i].v);
  for (int i = q - 1; i >= 0; --i) {
    if (qq[i].op == 2)
      merge(e[qq[i].val].u, e[qq[i].val].v);
    else
      qq[i].val = find(qq[i].val);
  }
  for (int i = 1; i <= tot; ++i)
    if (i == find(i)) dfs(i, -1);
  for (int i = 1; i <= n; ++i) upd(st[i], p[i]);
  for (int i = 0; i < q; ++i) {
    if (qq[i].op == 1) {
      int x = qq[i].val;
      auto ans = ask(st[x], ed[x]);
      cout << ans.first << '\n';
      upd(ans.second, 0);
    }
  }
  return 0;
}
