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<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
const int N=600010,M=300010,Q=500010;
struct edge1{
	int u,v,flag;
}d1[M];
struct edge{
	int y,next;
}data[M*2];
struct qry{
	int x,tp;
}q1[Q];
int n,m,q,num,num1,num2,p1[N],dfn[N],tid[N],lst[N],fa[N],h[N],pos[N],tree[N*4];
inline int read(){
	int x=0;char ch=getchar();
	while(ch<'0'||ch>'9')ch=getchar();
	while(ch>='0'&&ch<='9')x=x*10+ch-'0',ch=getchar();
	return x;
}
int getfa1(int x){
	if(fa[x]!=x)fa[x]=getfa1(fa[x]);
	return fa[x];
}
inline void addedge(int u,int v){
	data[++num].y=v,data[num].next=h[u],h[u]=num;
	data[++num].y=u,data[num].next=h[v],h[v]=num;
}
void dfs(int u,int f){
	dfn[u]=++num2;tid[num2]=u;
	for(int i=h[u],v;i!=-1;i=data[i].next){
		v=data[i].y;
		if(v!=f)dfs(v,u);
	}
	lst[u]=num2;
}
void print(int p,int pa,int pb){
	printf("%d:%d-%d mx%d pos%d\n",p,pa,pb,tree[p],tree[p]);
	if(pa==pb)return;
	int mid=(pa+pb)>>1;
	print(p<<1,pa,mid);print(p<<1|1,mid+1,pb);
}
inline max1(int i,int j){return i>j?i:j;}
inline void update(int p){tree[p]=max1(tree[p<<1],tree[p<<1|1]);}
void build(int p,int pa,int pb){
	if(pa==pb){tree[p]=p1[tid[pa]];pos[p1[tid[pa]]]=p;return;}
	int mid=(pa+pb)>>1;
	build(p<<1,pa,mid);build(p<<1|1,mid+1,pb);
	update(p);
}
int query(int p,int pa,int pb,int a,int b){
	if(a<=pa&&pb<=b)return tree[p];
	int mid=(pa+pb)>>1,q1=0,q2=0;
	if(a<=mid)q1=query(p<<1,pa,mid,a,b);
	if(mid<b)q2=query(p<<1|1,mid+1,pb,a,b);
	return max1(q1,q2);
}
int main(){
//	freopen("cf1417f.in","r",stdin);
//	freopen("cf1417f.out","w",stdout);
	n=read(),m=read(),q=read();
	for(int i=1;i<=n;++i)p1[i]=read(),fa[i]=i;
	for(int i=1;i<=m;++i)d1[i].u=read(),d1[i].v=read(),d1[i].flag=1;
	for(int i=1;i<=q;++i){
		q1[i].tp=read(),q1[i].x=read();
		if(q1[i].tp==2)d1[q1[i].x].flag=0;
	}
	num=0;memset(h,-1,sizeof h);
	for(int i=1,uu,vv;i<=m;++i)
		if(d1[i].flag){
			uu=getfa1(d1[i].u),vv=getfa1(d1[i].v);
			fa[uu]=vv;
		}
	for(int i=1,x;i<=n;++i){
		x=getfa1(i);if(x!=i)addedge(x,i);
	}
	num1=n;
	for(int i=q,uu,vv;i>=1;--i){
		if(q1[i].tp==1){
			q1[i].x=getfa1(q1[i].x);
			//printf("%d %d\n",i,q1[i].x);
		}else{
			uu=getfa1(d1[q1[i].x].u),vv=getfa1(d1[q1[i].x].v);
			if(uu==vv)continue;
			p1[++num1]=0;
			fa[uu]=fa[vv]=fa[num1]=num1;
			addedge(num1,uu),addedge(num1,vv);
		}
	}
	p1[num1+1]=0;
	for(int i=1;i<=num1;++i)if(getfa1(i)==i)addedge(num1+1,i);
//	for(int i=1;i<=num1+1;++i){
//		printf("%d:",i);
//		for(int j=h[i];j!=-1;j=data[j].next)printf("%d ",data[j].y);
//		printf("\n");
//	}
	num2=0;
	dfs(num1+1,num1+1);
//	for(int i=1;i<=num1+1;++i)printf("%d %d %d\n",i,dfn[i],lst[i]);
	build(1,1,num2);tree[0]=-1;
//	print(1,1,num2);printf("\n");
	for(int i=1,x,y;i<=q;++i){
		if(q1[i].tp==2)continue;
		y=query(1,1,num2,dfn[q1[i].x],lst[q1[i].x]);
		printf("%d\n",y);
		if(y!=0){
			x=pos[y];tree[x]=0;x>>=1;
			while(x){update(x);x>>=1;}
		}
//		print(1,1,num2);printf("\n");
	}
	return 0;
} 
