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>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

using namespace std;
using namespace __gnu_pbds;

typedef tree<int, null_type, less<int>, rb_tree_tag,tree_order_statistics_node_update> ordered_set;

#define scan(x) do{while((x=getchar())<'0'); for(x-='0'; '0'<=(_=getchar()); x=(x<<3)+(x<<1)+_-'0');}while(0)
char _;
#define complete_unique(a) a.erase(unique(a.begin(),a.end()),a.end())
#define all(a) a.begin(),a.end()
#define pb push_back
#define endl "\n"
#define INT_INF 0x3f3f3f3f
#define LL_INF 0x3f3f3f3f3f3f3f3f
#define EPS 1e-9
#define MOD 1000000007
#define MOD2 1494318097
#define SEED 131
#define mp make_pair
#define fastio cin.tie(0); cin.sync_with_stdio(0);

#define MAXN 200005
#define MAXM 300005
#define MAXQ 500005

typedef unsigned long long ull;
typedef long long ll;
typedef long double ld;
typedef pair<int,int> pii;
typedef pair<double,double> pdd;
typedef pair<ll,ll> pll;
typedef int8_t byte;

const ld PI = (ld)4*atanl(1);

mt19937 g1(chrono::steady_clock::now().time_since_epoch().count());

int randint(int a, int b){return uniform_int_distribution<int>(a, b)(g1);}
ll randlong(ll a,ll b){return uniform_int_distribution<long long>(a, b)(g1);}

ll gcd(ll a, ll b){return b == 0 ? a : gcd(b, a % b);}
ll lcm(ll a, ll b){return a*b/gcd(a,b);}
ll fpow(ll  b, ll exp, ll mod){if(exp == 0) return 1;ll t = fpow(b,exp/2,mod);if(exp&1) return t*t%mod*b%mod;return t*t%mod;}
ll divmod(ll i, ll j, ll mod){i%=mod,j%=mod;return i*fpow(j,mod-2,mod)%mod;}

int N,M,Q,arr[MAXN],group[MAXN],par[MAXN],temp[MAXN],sz[MAXN];
pii edges[MAXM];
pii queries[MAXQ];
bool marked[MAXM],good[MAXM];
set<pii> vals[MAXN];

inline int root(int node){
    while(node != par[node]){
        par[node] = par[par[node]];
        node = par[node];
    }
    return node;
}

inline int fp(int node){
    while(par[node] != node) node = par[node];
    return node;
}

inline void merge(int a, int b){
    if(a == b) return;
    if(sz[a] < sz[b]) swap(a,b);
    sz[a]+=sz[b];
    par[b] = a;

    int curr = a;
    while(curr != par[curr]){
        if(vals[curr].size()) vals[par[curr]].erase(*vals[curr].rbegin());
        curr = par[curr];
    }

    curr = b;
    while(curr != par[curr]){
        if(vals[curr].size()) vals[par[curr]].insert(*vals[curr].rbegin());
        curr = par[curr];
    }
}

int main(){
    fastio; cin >> N >> M >> Q;
    for(int i=1; i<=N; i++){
        cin >> arr[i];
        par[i] = i;
        sz[i] = 1;
    }
    for(int i=1; i<=M; i++)
        cin >> edges[i].first >> edges[i].second;
    for(int i=1; i<=Q; i++){
        int op,k; cin >> op >> k;
        queries[i] = {op,k};
        if(op == 2) marked[k] = true;
    }
    for(int i=1; i<=M; i++){
        if(marked[i]) continue;
        int f = root(edges[i].first), s = root(edges[i].second);
        par[f] = s;
    }
    for(int i=1; i<=N; i++)
        vals[root(i)].insert(mp(arr[i],root(i)));
    for(int i=1; i<=N; i++) temp[i] = par[i];
    for(int i=M; i>=1; i--){
        if(marked[i]){
            int f = root(edges[i].first), s = root(edges[i].second);
            if(f == s) continue;
            good[i] = true;
            par[f] = s;
//            cout << f << " " << s << endl;
        }
    }
    for(int i=1; i<=N; i++) par[i] = temp[i];
    for(int i=1; i<=N; i++) group[i] = root(i);
    for(int i=1; i<=M; i++){
        if(good[i]){
            int f = fp(group[edges[i].first]), s = fp(group[edges[i].second]);
            merge(f,s);
            edges[i] = mp(f,s);
//            cout << f << " " << s << endl;
//            cout << i << endl;
        }
    }
    for(int i=1; i<=Q; i++){
        int op = queries[i].first, v = queries[i].second;
        if(op == 1){
            v = fp(group[v]);
            if(vals[v].empty()) cout << 0 << endl;
            else{
                pii best = *vals[v].rbegin();
                cout << best.first << endl;

                int curr = best.second;
                while(curr != par[curr]){
                    if(vals[curr].size()) vals[par[curr]].erase(*vals[curr].rbegin());
                    curr = par[curr];
                }

                curr = best.second;
                vals[curr].erase(best);
                while(curr != par[curr]){
                    if(vals[curr].size()) vals[par[curr]].insert(*vals[curr].rbegin());
                    curr = par[curr];
                }
            }
        }else if(good[v]){
            int f = edges[v].first, s = edges[v].second;
            if(par[f] == s) swap(f,s);
            sz[f]-=sz[s];

            int curr = s;
            while(curr != par[curr]){
                if(vals[curr].size()) vals[par[curr]].erase(*vals[curr].rbegin());
                curr = par[curr];
            }

            curr = f;
            while(curr != par[curr]){
                if(vals[curr].size()) vals[par[curr]].insert(*vals[curr].rbegin());
                curr = par[curr];
            }
            par[s] = s;
        }
    }
}