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("-O3")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
using namespace std;
long long MOD = 998244353;
const long long INF = 1e18;
const double E = 1e-7;
const double PI = acos(-1);
mt19937_64 rnd(time(0));
long long p1 = 31, p2 = 37, p3 = 7, p4 = rnd() % 100 + 1, md1 = MOD,
          md2 = 998244353, md3 = 998244357, md4 = rnd() % 1000000000;
long long n, m, a[200001];
int pos[200001];
vector<pair<int, int> > zp, edges, pt;
vector<pair<int, int> > c[200001];
vector<int> qq[2][200001];
vector<int> v[200001], nw, vr;
bool tl[200001], qw[200001], tt[200001], zz[200001], ha[200001];
long long binpow(long long h, long long r, long long md = MOD) {
  long long l = 1;
  while (r) {
    if (r & 1) l *= h, l %= md;
    h *= h;
    h %= md;
    r /= 2;
  }
  return l;
}
long long gcd(long long x, long long y) {
  if (x == 0 || y == 0) return x + y;
  if (x < y) swap(x, y);
  while (x && y) {
    x %= y;
    swap(x, y);
  }
  return x + y;
}
struct dsu {
  int d[200001], kl[200001];
  void make_set(int h) {
    d[h] = h;
    kl[h] = 1;
    return;
  }
  int find_set(int h) {
    if (h == d[h])
      return h;
    else
      return find_set(d[h]);
  }
  void unite_sets(int x, int y) {
    x = find_set(x);
    y = find_set(y);
    if (x == y) return;
    if (kl[y] > kl[x]) swap(x, y);
    d[y] = x;
    kl[x] += kl[y];
  }
};
dsu st;
void dfs(int h) {
  if (nw.size()) st.unite_sets(nw.back(), h);
  nw.push_back(h);
  tt[h] = 1;
  for (int i = 0; i < c[h].size(); i++)
    if (!tl[c[h][i].second] && !tt[c[h][i].first]) {
      dfs(c[h][i].first);
    }
}
void rec(int h) {
  if (qq[0][h].size() == 0) {
    if (v[h][0] != h)
      while (1)
        ;
    for (int i = 0; i < v[h].size(); i++) {
      pos[v[h][i]] = vr.size();
      vr.push_back(v[h][i]);
    }
    return;
  }
  long long y = qq[0][h].back();
  qq[0][h].pop_back();
  rec(h);
  rec(y);
}
pair<int, int> d[1000001];
void build(int h, int l, int r) {
  if (l == r) {
    d[h] = make_pair(a[vr[l]], l);
    return;
  }
  int w = (l + r) / 2;
  build(h * 2, l, w);
  build(h * 2 + 1, w + 1, r);
  pair<int, int> o1 = d[h * 2], o2 = d[h * 2 + 1];
  if (o1.first < o2.first)
    d[h] = o2;
  else
    d[h] = o1;
}
pair<int, int> get(int h, int l, int r, int x, int y) {
  if (x > y) return make_pair(0, l);
  if (l == x && y == r) return d[h];
  int w = (l + r) / 2;
  pair<int, int> o1 = get(h * 2, l, w, x, min(y, w)),
                 o2 = get(h * 2 + 1, w + 1, r, max(x, w + 1), y);
  if (o1.first > o2.first)
    return o1;
  else
    return o2;
}
void update(int h, int l, int r, int x) {
  if (l == r) {
    d[h].first = 0;
    return;
  }
  int w = (l + r) / 2;
  if (x <= w)
    update(h * 2, l, w, x);
  else
    update(h * 2 + 1, w + 1, r, x);
  pair<int, int> o1 = d[h * 2], o2 = d[h * 2 + 1];
  if (o1.first < o2.first)
    d[h] = o2;
  else
    d[h] = o1;
}
void solve() {
  long long q;
  cin >> n >> m >> q;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 1; i <= m; i++) {
    long long x, y;
    cin >> x >> y;
    c[x].push_back(make_pair(y, i));
    c[y].push_back(make_pair(x, i));
    edges.push_back(make_pair(x, y));
  }
  for (int i = 1; i <= n; i++) st.make_set(i);
  for (int i = 0; i < q; i++) {
    long long x, y;
    cin >> x >> y;
    if (x == 2) tl[y] = 1;
    pt.push_back(make_pair(x, y));
  }
  for (int i = 1; i <= n; i++)
    if (!tt[i]) {
      nw.clear();
      dfs(i);
      zz[i] = 1;
      v[i] = nw;
    }
  for (int i = pt.size() - 1; i > -1; i--) {
    if (pt[i].first == 2) {
      long long x = edges[pt[i].second - 1].first;
      long long y = edges[pt[i].second - 1].second;
      x = st.find_set(x);
      y = st.find_set(y);
      if (x == y) {
        ha[i] = 1;
        continue;
      }
      if (st.kl[x] < st.kl[y]) swap(x, y);
      st.unite_sets(x, y);
      zz[y] = 0;
      qq[0][x].push_back(y);
      qq[1][x].push_back(y);
    }
  }
  for (int i = 1; i <= n; i++)
    if (zz[i]) {
      rec(i);
    }
  build(1, 0, vr.size() - 1);
  for (int i = 0; i < pt.size(); i++)
    if (!ha[i]) {
      pair<long long, long long> o = pt[i];
      if (o.first == 1) {
        int u = st.find_set(o.second);
        pair<int, int> e =
            get(1, 0, vr.size() - 1, pos[u], pos[u] + st.kl[u] - 1);
        cout << e.first << "\n";
        update(1, 0, vr.size() - 1, e.second);
      } else {
        int u = st.find_set(edges[o.second - 1].first);
        st.d[qq[1][u].back()] = qq[1][u].back();
        st.kl[u] -= st.kl[qq[1][u].back()];
        qq[1][u].pop_back();
      }
    }
}
int main() {
  long long t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
