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>
using namespace std;
inline long long mod(long long n, long long m) {
  long long ret = n % m;
  if (ret < 0) ret += m;
  return ret;
}
long long gcd(long long a, long long b) {
  return (b == 0LL ? a : gcd(b, a % b));
}
long long exp(long long a, long long b, long long m) {
  if (b == 0LL) return 1LL;
  if (b == 1LL) return mod(a, m);
  long long k = mod(exp(a, b / 2, m), m);
  if (b & 1LL) {
    return mod(a * mod(k * k, m), m);
  } else
    return mod(k * k, m);
}
const int N = 200100;
int p[N];
pair<int, int> e[300100], Q[500100];
bool mark[300100];
vector<int> vec[200100];
vector<int> here[300100];
set<pair<int, int> > vals[N];
int pai[N];
bool sp[300100];
int tam(int x) { return ((int)vec[pai[x]].size()); }
void join(int a, int b) {
  a = pai[a], b = pai[b];
  if (a == b) return;
  if (tam(a) > tam(b)) swap(a, b);
  for (int x : vec[a]) {
    vec[b].push_back(x);
    pai[x] = b;
  }
  vec[a].clear();
}
inline int maxi(int x) {
  x = pai[x];
  pair<int, int> v = *vals[x].rbegin();
  vals[x].erase(v);
  p[v.second] = 0;
  vals[x].insert(pair<int, int>(p[v.second], v.second));
  return v.first;
}
inline void erase(int a, int b, int id) {
  b = pai[b];
  for (int x : here[id]) {
    pai[x] = a;
    vals[b].erase(pair<int, int>(p[x], x));
    vals[a].insert(pair<int, int>(p[x], x));
  }
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int n, m, q;
  cin >> n >> m >> q;
  for (int i = 1; i <= n; i++) {
    cin >> p[i];
    pai[i] = i;
    vec[i].push_back(i);
    vals[i].insert(pair<int, int>(p[i], i));
  }
  for (int i = 1; i <= m; i++) cin >> e[i].first >> e[i].second;
  for (int i = 1; i <= q; i++) {
    cin >> Q[i].first >> Q[i].second;
    if (Q[i].first == 2) {
      mark[Q[i].second] = 1;
    }
  }
  for (int i = 1; i <= m; i++) {
    if (!mark[i]) {
      join(e[i].first, e[i].second);
    }
  }
  for (int i = q; i >= 1; i--) {
    if (Q[i].first == 2) {
      int id = Q[i].second;
      if (pai[e[id].first] != pai[e[id].second]) {
        sp[id] = 1;
        if (tam(e[id].first) > tam(e[id].second)) {
          swap(e[id].first, e[id].second);
        }
        e[id].first = pai[e[id].first];
        here[id] = vec[e[id].first];
        e[id].second = pai[e[id].second];
        join(e[id].first, e[id].second);
      }
    }
  }
  for (int i = 1; i <= n; i++) {
    if (pai[i] == i) {
      for (int x : vec[i]) vals[i].insert(pair<int, int>(p[x], x));
    }
  }
  for (int i = 1; i <= q; i++) {
    if (Q[i].first == 1) {
      cout << maxi(Q[i].second) << "\n";
    } else {
      int id = Q[i].second;
      if (!sp[id]) continue;
      erase(e[id].first, e[id].second, id);
    }
  }
}
