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

import java.util.*;
import java.io.*;
public class MyClass {
        private int v;
        private LinkedList<Integer> adj[];
        MyClass(int vertices){
            v=vertices;
            adj=new LinkedList[v+1];
            for(int i=0;i<=v;i++)
            adj[i]=new LinkedList();
        }
        void addedge(int u,int v){
            adj[u].add(v);
            adj[v].add(u);
        }
    public static void main(String args[]) throws IOException{
     BufferedReader b=new BufferedReader(new InputStreamReader(System.in));
     String[] a=b.readLine().split(" ");
     int n=Integer.parseInt(a[0]);
     int m=Integer.parseInt(a[1]);
     int q=Integer.parseInt(a[2]);
     MyClass g=new MyClass(n);
     Map<Integer,Integer> mv=new HashMap<>();
     String[] x=b.readLine().split(" ");
     for(int i=1;i<=n;i++ )
       mv.put(i,Integer.parseInt(x[i-1]));
     int edges[][]=new int[m+1][2];
     for(int i=1;i<=m;i++ ){
       String[] t=b.readLine().split(" "); 
       int u=Integer.parseInt(t[0]);
       int v=Integer.parseInt(t[1]);
       edges[i][0]=u;
       edges[i][1]=v;
       g.addedge(u,v);
     }
     for(int j=0;j<q;j++)
     {
         String[] cur=b.readLine().split(" ");
         
         if(cur[0].equals("1")){
              int source=Integer.parseInt(cur[1]);
              int ans=g.calculatemax(g,source,mv);
              System.out.println(ans);
         }
        else {
            int whichedge=Integer.parseInt(cur[1]);
              g.removeedge(g,whichedge,edges);
        }
     }
    }
     int calculatemax(MyClass g,int source,Map<Integer,Integer> mv)
    {
        int maxi=mv.get(source);
        boolean visited[]=new boolean[v+1];
        for(int i=0;i<=v;i++)
          visited[i]=false;
       
       maxi= dfsutil(source,visited,mv,maxi);
        for(int key: mv.keySet()) {
            if(mv.get(key).equals(maxi)) {
                mv.put(key,0);
    }
}
        return maxi;
    }
   int dfsutil(int source,boolean[] visited,Map<Integer,Integer> mv,int maxi){
        visited[source]=true;
        Iterator<Integer> it=adj[source].iterator();
        while(it.hasNext()){
            int now=it.next();
            if(visited[now]==false){
                maxi=Math.max(maxi,mv.get(now));
                return dfsutil(now,visited,mv,maxi);
            }
        }
        return maxi;
    }
  void removeedge(MyClass g,int edgeindex,int[][] edges)
    {
       int u=edges[edgeindex][0];
       int v=edges[edgeindex][1];
       adj[u].remove(new Integer(v));
       
    }
}