#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
const long double pi = std::acos(-1);
long long gcd(long long a, long long b) {
  if (!b) {
    return a;
  }
  return gcd(b, a % b);
}
long long gcdE(long long a, long long b, long long* x, long long* y) {
  if (!a) {
    *x = 0;
    *y = 1;
    return b;
  }
  long long x1, y1;
  long long _gcd = gcdE(b % a, a, &x1, &y1);
  *x = y1 - (b / a) * x1;
  *y = x1;
  return _gcd;
}
long long power(long long x, long long y) {
  long long res = 1;
  while (y) {
    if (y & 1) {
      res = (res * x) % mod;
    }
    y >>= 1;
    x = (x * x) % mod;
  }
  return res;
}
long long inverse(long long x) { return power(x, mod - 2); }
int n, m, q;
vector<int> p(1000001, 0);
vector<int> b(1000001, 0);
vector<pair<int, int>> edges(300001);
vector<bool> exists(300001, 1);
vector<pair<int, int>> query(500001);
vector<int> dsuparent(500001);
vector<int> adj[500001];
vector<pair<int, int>> node;
vector<pair<int, int>> segtree;
int timer = 0;
vector<int> in(1000001), out(1000001);
vector<int> conv(1000001);
void dfs(int c) {
  in[c] = ++timer;
  for (int x : adj[c]) {
    dfs(x);
  }
  out[c] = ++timer;
}
int find(int i) {
  if (dsuparent[i] != i) {
    dsuparent[i] = find(dsuparent[i]);
  }
  return dsuparent[i];
}
void add(int x, int y) {
  int xroot = find(x);
  int yroot = find(y);
  if (xroot == yroot) {
    return;
  }
  adj[++n].push_back(xroot);
  adj[n].push_back(yroot);
  dsuparent[xroot] = dsuparent[yroot] = dsuparent[n] = n;
}
void dsuinit() {
  for (int i = 1; i <= n; i++) {
    dsuparent[i] = i;
  }
}
pair<int, int> getsum(int ns, int ne, int qs, int qe, int ci) {
  if (qs <= ns && qe >= ne) {
    return segtree[ci];
  }
  if (qe < ns || ne < qs) {
    return {-1, -1};
  }
  int mid = ns + ((ne - ns) >> 1);
  return max(getsum(ns, mid, qs, qe, (ci << 1) + 1),
             getsum(mid + 1, ne, qs, qe, (ci << 1) + 2));
}
pair<int, int> segquery(int qs, int qe) {
  return getsum(0, timer - 1, qs, qe, 0);
}
void updatef(int ns, int ne, int i, int ci) {
  if (i < ns || i > ne) {
    return;
  }
  if (ns == ne) {
    segtree[ci] = {0, 0};
    return;
  }
  int mid = ns + ((ne - ns) >> 1);
  updatef(ns, mid, i, (ci << 1) + 1);
  updatef(mid + 1, ne, i, (ci << 1) + 2);
  segtree[ci] = max(segtree[(ci << 1) + 1], segtree[(ci << 1) + 2]);
}
void update(int index) { updatef(0, timer - 1, index, 0); }
pair<int, int> construct(int si, int ei, int ci) {
  if (si == ei) {
    segtree[ci] = {b[si + 1], si + 1};
    return segtree[ci];
  }
  int mid = si + ((ei - si) >> 1);
  segtree[ci] = max(construct(si, mid, (ci << 1) + 1),
                    construct(mid + 1, ei, (ci << 1) + 2));
  return segtree[ci];
}
void init() {
  for (int i = 1; i <= n; i++) {
    b[in[i]] = b[out[i]] = p[i];
    conv[in[i]] = conv[out[i]] = i;
  }
  segtree.resize((timer << 2) + 1);
  construct(0, timer - 1, 0);
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m >> q;
  for (int i = 1; i <= n; i++) {
    cin >> p[i];
  }
  dsuinit();
  for (int i = 1; i <= m; i++) {
    cin >> edges[i].first >> edges[i].second;
  }
  for (int i = 1; i <= q; i++) {
    cin >> query[i].first >> query[i].second;
    if (query[i].first == 2) {
      exists[query[i].second] = 0;
    }
  }
  for (int i = 1; i <= m; i++) {
    if (exists[i]) {
      add(edges[i].first, edges[i].second);
    }
  }
  for (int i = q; i >= 1; i--) {
    if (query[i].first == 2) {
      add(edges[query[i].second].first, edges[query[i].second].second);
      continue;
    }
    query[i].second = find(query[i].second);
  }
  for (int i = 1; i <= n; i++) {
    if (find(i) == i) {
      dfs(i);
    }
  }
  init();
  for (int i = 1; i <= q; i++) {
    if (query[i].first == 1) {
      pair<int, int> get =
          segquery(in[query[i].second] - 1, out[query[i].second] - 1);
      cout << get.first << "\n";
      get.second = conv[get.second];
      if (get.second >= 1) {
        update(in[get.second] - 1);
        update(out[get.second] - 1);
      }
    }
  }
}
