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>
#pragma GCC optimize("Ofast")
#pragma GCC target("avx")
#pragma GCC optimize("unroll-loops")
using namespace std;
const long long N = 5e5 + 5, M = 3e5 + 5, Q = 5e5 + 5;
long long n, m, q;
pair<long long, long long> edge[M], query[Q], t[N * 4];
long long a[N], rem[M], par[N], tin[N], tout[N], timer = 0;
vector<long long> g[N];
long long parent(long long x) {
  if (x == par[x]) return x;
  return par[x] = parent(par[x]);
}
void join(long long a, long long b) {
  a = parent(a);
  b = parent(b);
  if (a == b) return;
  par[n] = par[a] = par[b] = n;
  g[n].push_back(a);
  g[n].push_back(b);
  n++;
}
void dfs(long long u) {
  tin[u] = ++timer;
  for (auto v : g[u]) {
    dfs(v);
  }
  tout[u] = timer;
}
pair<long long, long long> answer(long long v, long long tl, long long tr,
                                  long long l, long long r) {
  if (l > r) return {0LL, 0LL};
  if (l <= tl && r >= tr) return t[v];
  long long tm = (tl + tr) >> 1;
  return max(answer(v << 1, tl, tm, l, tm),
             answer((v << 1) | 1, tm + 1, tr, tm + 1, r));
}
void update(long long v, long long tl, long long tr, long long i,
            pair<long long, long long> x) {
  if (tl == tr) {
    t[v] = x;
    return;
  }
  long long tm = (tl + tr) >> 1;
  if (i <= tm)
    update(v << 1, tl, tm, i, x);
  else
    update((v << 1) | 1, tm + 1, tr, i, x);
  t[v] = max(t[v << 1], t[(v << 1) | 1]);
}
void solve() {
  cin >> n >> m >> q;
  for (long long i = 0; i < n; ++i) {
    cin >> a[i];
  }
  for (long long i = 0; i < m; ++i) {
    long long u, v;
    cin >> u >> v;
    edge[i] = {u - 1, v - 1};
    rem[i] = 0;
  }
  for (long long i = 0; i < q; ++i) {
    long long a, b;
    cin >> a >> b;
    --b;
    query[i] = {a, b};
    if (a == 2) {
      rem[b] = 1;
    }
  }
  for (long long i = 0; i < n; ++i) par[i] = i;
  for (long long i = 0; i < m; ++i) {
    if (!rem[i]) {
      join(edge[i].first, edge[i].second);
    }
  }
  for (long long i = q - 1; ~i; --i) {
    long long typ = query[i].first;
    if (typ == 2) {
      long long index = query[i].second;
      join(edge[index].first, edge[index].second);
    } else {
      query[i].second = parent(query[i].second);
    }
  }
  for (long long i = 0; i < n; ++i) {
    if (parent(i) == i) {
      dfs(i);
    }
  }
  for (long long i = 0; i < n; ++i) {
    update(1, 0, n - 1, tin[i] - 1, make_pair(a[i], tin[i] - 1));
  }
  for (long long i = 0; i < q; ++i) {
    long long typ = query[i].first;
    if (typ == 2) {
      continue;
    }
    long long v = query[i].second;
    pair<long long, long long> temp =
        answer(1, 0, n - 1, tin[v] - 1, tout[v] - 1);
    cout << temp.first << '\n';
    if (temp.first) {
      if (temp.second == -1) continue;
      update(1, 0, n - 1, temp.second, make_pair(0LL, -1LL));
    }
  }
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  long long t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
