#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MAXN = 1e5 + 7;
ll par[MAXN], mx[MAXN], q;
set <ll> tplt[MAXN];
bool mark[MAXN];
pair <ll, ll> edge[MAXN];
ll n, m;
ll find(ll u){return par[u] < 0 ? u : par[u] = find(par[u]);}
bool join(ll x, ll y){
x = find(x);
y = find(y);
if(x == y) return false;
if(par[x] > par[y]) swap(x, y);
mx[x] = max(mx[x], mx[y]);
tplt[x].insert(mx[x]);
par[x] += par[y];
par[y] = x;
}
struct DS{
ll q, u, idx;
};
vector <DS> ds;
int main(){
ios_base::sync_with_stdio(0);
cout.tie(0);
cin.tie(0);
cin >> n >> m >> q;
for(int i = 1; i <= n; i++) cin >> mx[i];
fill(par + 1, par + 1 + n, -1);
for(int i = 1; i <= m; i++){
ll x, y;
cin >> x >> y;
edge[i] = {x, y};
}
for(int i = 1; i <= q;i++){
ll type, u;
cin >> type >> u;
ds.push_back({type, u, i});
}
for(int i = 1; i <= m; i++){
ll x = edge[i].first;
ll y = edge[i].second;
if(!mark[i]) join(x, y);
}
sort(ds.begin(), ds.end(), [&] (DS a, DS b){
return a.idx > b.idx;
});
for(auto [type, u, id] : ds){
if(type == 1){
cout << *(--tplt[find(u)].end()) << endl;
tplt[find(u)].erase(--tplt[find(u)].end());
}
else {ll x = edge[u].first , y = edge[u].second;
join(x, y);}
}
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CnR5cGVkZWYgbG9uZyBsb25nIGxsOwpjb25zdCBpbnQgTUFYTiA9IDFlNSArIDc7CmxsIHBhcltNQVhOXSwgbXhbTUFYTl0sIHE7CnNldCA8bGw+IHRwbHRbTUFYTl07CmJvb2wgbWFya1tNQVhOXTsKcGFpciA8bGwsIGxsPiBlZGdlW01BWE5dOwpsbCBuLCBtOwpsbCBmaW5kKGxsIHUpe3JldHVybiBwYXJbdV0gPCAwID8gdSA6IHBhclt1XSA9IGZpbmQocGFyW3Vd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