#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
void err(istream_iterator<string> it) {}
template <typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
  cerr << *it << " = " << a << ", ";
  err(++it, args...);
  cout << "\n";
}
long long powm(long long a, long long b, long long mod) {
  long long res = 1;
  while (b) {
    if (b & 1) res = (res * a) % mod;
    a = (a * a) % mod;
    b >>= 1;
  }
  return res;
}
const long long mod = 1e9 + 7;
const long long N = 1000005;
const long long inf = 1e9;
int n, tin[N], tout[N];
int q, par[N], timer = 0, m, arr[N];
vector<int> adj[N];
bool del[N];
pair<int, int> t[N << 2], query[N], edg[N];
int findPar(int x) {
  if (x == par[x]) return x;
  return par[x] = findPar(par[x]);
}
void unite(int a, int b) {
  a = findPar(a);
  b = findPar(b);
  if (a == b) return;
  ++n;
  par[a] = n;
  par[n] = n;
  par[b] = n;
  adj[n].push_back(a);
  adj[n].push_back(b);
}
void dfs(int v) {
  tin[v] = ++timer;
  for (int to : adj[v]) dfs(to);
  tout[v] = timer;
}
pair<int, int> segMax(int v, int tl, int tr, int l, int r) {
  if (l > r || tl > r || tr < l) {
    return make_pair(0, 0);
  }
  if (l <= tl && tr <= r) {
    return t[v];
  }
  int mid = (tl + tr) >> 1;
  int c1 = (v << 1), c2 = (c1 | 1);
  return max(segMax(c1, tl, mid, l, r), segMax(c2, mid + 1, tr, l, r));
}
void update(int v, int tl, int tr, int p, pair<int, int> x) {
  if (tl == tr) {
    t[v] = x;
    return;
  }
  int mid = (tl + tr) >> 1;
  int c1 = (v << 1), c2 = (c1 | 1);
  if (p <= mid) {
    update(c1, tl, mid, p, x);
  } else {
    update(c2, mid + 1, tr, p, x);
  }
  t[v] = max(t[c1], t[c2]);
}
void solve() {
  cin >> n >> m >> q;
  for (int i = 1; i <= n; i++) cin >> arr[i];
  for (int i = 1; i <= m; i++) {
    del[i] = 0;
    cin >> edg[i].first >> edg[i].second;
  }
  for (int i = 1; i <= q; i++) {
    cin >> query[i].first >> query[i].second;
    if (query[i].first == 2) del[query[i].second] = 1;
  }
  for (int i = 1; i <= n; i++) par[i] = i;
  for (int i = 1; i <= m; i++) {
    if (!del[i]) unite(edg[i].first, edg[i].second);
  }
  for (int i = q; i >= 1; i--) {
    if (query[i].first == 2) {
      unite(edg[query[i].second].first, edg[query[i].second].second);
    } else {
      query[i].second = findPar(query[i].second);
    }
  }
  for (int i = n; i >= 1; i--)
    if (par[i] == i) dfs(i);
  for (int i = 1; i <= n; i++) {
    update(1, 1, n, tin[i], make_pair(arr[i], tin[i]));
  }
  for (int i = 1; i <= q; i++) {
    int tp = query[i].first;
    if (tp == 1) {
      int v = query[i].second;
      pair<int, int> tmp = segMax(1, 1, n, tin[v], tout[v]);
      if (tmp.first == 0)
        cout << 0 << '\n';
      else {
        cout << tmp.first << '\n';
        update(1, 1, n, tmp.second, make_pair(0, 0));
      }
    }
  }
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0), cout.tie(0);
  cout << fixed << setprecision(15);
  int tc = 1;
  while (tc--) {
    solve();
  }
  return 0;
}
