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.io.*;
import java.util.*;

/*
polyakoff
*/

public class Main {

    static FastReader in;
    static PrintWriter out;
    static Random rand = new Random();
    static final int oo = (int) 1e9 + 10;
    static final long OO = (long) 2e18 + 20;
    static final int MOD = (int) 1e9 + 7;

    static int n;
    static int[] par, p;

    static int findSet(int u) {
        if (par[u] == u)
            return u;
        return par[u] = findSet(par[u]);
    }

    static class SegTree {
        class Node {
            int max;
            Pair lr;

            Node(int max, Pair lr) {
                this.max = max;
                this.lr = lr;
            }
        }
        Node[] t;
        int size;

        void push(int u) {
            if (t[u].lr.l != -1) {
                t[u * 2 + 1].lr.l = t[u].lr.l;
                t[u * 2 + 1].lr.r = t[u].lr.r;
                t[u * 2 + 2].lr.l = t[u].lr.l;
                t[u * 2 + 2].lr.r = t[u].lr.r;
                t[u].lr.l = t[u].lr.r = -1;
            }
        }
        void pull(int u) {
            t[u].max = p[t[u * 2 + 1].max] > p[t[u * 2 + 2].max] ? t[u * 2 + 1].max : t[u * 2 + 2].max;
        }
        void build(int u, int tl, int tr, int[][] initial) {
            if (tl == tr) {
                t[u] = new Node(initial[tl][0], new Pair(initial[tl][1], initial[tl][2]));
            } else {
                int tm = (tl + tr) / 2;
                build(u * 2 + 1, tl, tm, initial);
                build(u * 2 + 2, tm + 1, tr, initial);
                t[u] = new Node(-1, new Pair(-1, -1));
                pull(u);
            }
        }
        int maxPOn(int u, int tl, int tr, int l, int r) {
            if (r < tl || tr < l)
                return n;
            if (l <= tl && tr <= r)
                return t[u].max;
            int tm = (tl + tr) / 2;
            push(u);
            int v1 = maxPOn(u * 2 + 1, tl, tm, l, r);
            int v2 = maxPOn(u * 2 + 2, tm + 1, tr, l, r);
            return p[v1] > p[v2] ? v1 : v2;
        }
        void setPIn(int u, int tl, int tr, int i, int p) {
            if (tl == tr) {

            } else {
                int tm = (tl + tr) / 2;
                push(u);
                if (i <= tm) {
                    setPIn(u * 2 + 1, tl, tm, i, p);
                } else {
                    setPIn(u * 2 + 2, tm + 1, tr, i, p);
                }
                pull(u);
            }
        }
        void setLROn(int u, int tl, int tr, int l, int r, int newL, int newR) {
            if (r < tl || tr < l)
                return;
            if (l <= tl && tr <= r) {
                t[u].lr.l = newL;
                t[u].lr.r = newR;
                return;
            }
            int tm = (tl + tr) / 2;
            push(u);
            setLROn(u * 2 + 1, tl, tm, l, r, newL, newR);
            setLROn(u * 2 + 2, tm + 1, tr, l, r, newL, newR);
            pull(u);
        }
        Pair LRIn(int u, int tl, int tr, int i) {
            if (tl == tr) {
                return t[u].lr;
            }
            int tm = (tl + tr) / 2;
            push(u);
            if (i <= tm) {
                return LRIn(u * 2 + 1, tl, tm, i);
            } else {
                return LRIn(u * 2 + 2, tm + 1, tr, i);
            }
        }

        void build(int[][] initial) {
            size = initial.length;
            t = new Node[size * 4];
            build(0, 0, size - 1, initial);
        }
        int maxPOn(int l, int r) {
            return maxPOn(0, 0, size - 1, l, r);
        }
        void setPIn(int i, int p) {
            setPIn(0, 0, size - 1, i, p);
        }
        void setLROn(int l, int r, int newL, int newR) {
            setLROn(0, 0, size - 1, l, r, newL, newR);
        }
        Pair LRIn(int i) {
            return LRIn(0, 0, size - 1, i);
        }
    }

    static class Pair {
        int l, r;

        Pair(int l, int r) {
            this.l = l;
            this.r = r;
        }
    }

    static class Edge {
        int u, v, l1, r1, l2, r2;
        boolean removed;

        Edge(int u, int v) {
            this.u = u;
            this.v = v;
            l1 = r1 = l2 = r2 = -1;
        }
    }

    static class Query {
        int type, x;

        Query(int type, int x) {
            this.type = type;
            this.x = x;
        }
    }

    static void solve() {
        n = in.nextInt();
        int m = in.nextInt();
        int q = in.nextInt();

        p = new int[n + 1];
        p[n] = 0;
        for (int i = 0; i < n; i++) {
            p[i] = in.nextInt();
        }

        Edge[] edges = new Edge[m];
        for (int i = 0; i < m; i++) {
            int u = in.nextInt() - 1;
            int v = in.nextInt() - 1;
            edges[i] = new Edge(u, v);
        }

        Query[] queries = new Query[q];
        for (int i = 0; i < q; i++) {
            int type = in.nextInt();
            int x = in.nextInt() - 1;
            queries[i] = new Query(type, x);
            if (type == 2)
                edges[x].removed = true;
        }

        par = new int[n];
        int[] size = new int[n];
        ArrayList<Integer>[] subtree = new ArrayList[n];
        for (int i = 0; i < n; i++) {
            par[i] = i;
            size[i] = 1;
            subtree[i] = new ArrayList<>();
            subtree[i].add(i);
        }

        for (Edge e : edges) {
            if (e.removed)
                continue;
            int u = findSet(e.u);
            int v = findSet(e.v);
            if (u == v)
                continue;
            if (size[u] < size[v]) {
                u ^= v; v ^= u; u ^= v;
            }
            par[v] = u;
            size[u] += size[v];
            subtree[u].addAll(subtree[v]);
        }

        for (int i = q - 1; i >= 0; i--) {
            Query query = queries[i];
            if (query.type == 1)
                continue;
            Edge e = edges[query.x];
            int u = findSet(e.u);
            int v = findSet(e.v);
            if (u == v)
                continue;
            if (size[u] < size[v]) {
                u ^= v; v ^= u; u ^= v;
            }
            par[v] = u;
            size[u] += size[v];
            e.l1 = subtree[u].get(0);
            e.r1 = subtree[u].get(subtree[u].size() - 1);
            e.l2 = subtree[v].get(0);
            e.r2 = subtree[v].get(subtree[v].size() - 1);
            subtree[u].addAll(subtree[v]);
        }

        int[][] initial = new int[n][3];
        int[] pos = new int[n];
        for (int u = 0, i = 0; u < n; u++) {
            if (findSet(u) == u) {
                initial[u][1] = i;
                initial[u][2] = i + size[u] - 1;
                for (int v : subtree[u]) {
                    initial[i][0] = v;
                    initial[i][1] = initial[u][1];
                    initial[i][2] = initial[u][2];
                    pos[v] = i;
                    i++;
                }
            }
        }

        SegTree st = new SegTree();
        st.build(initial);

        for (int i = 0; i < q; i++) {
            Query query = queries[i];
            if (query.type == 1) {
                int u = query.x;
                Pair lr = st.LRIn(pos[u]);
                int v = st.maxPOn(lr.l, lr.r);
                out.println(p[v]);
                if (v != n) {
                    p[v] = 0;
                    st.setPIn(pos[v], 0);
                }
            } else {
                Edge e = edges[query.x];
                if (e.l1 != -1) {
                    st.setLROn(pos[e.l1], pos[e.r1], pos[e.l1], pos[e.r1]);
                    st.setLROn(pos[e.l2], pos[e.r2], pos[e.l2], pos[e.r2]);
                }
            }
        }


    }


    public static void main(String[] args) {
        in = new FastReader();
        out = new PrintWriter(System.out);
//        fileInputOutput();

        int T = 1;
//        T = in.nextInt();
        while (T-- > 0)
            solve();

        out.flush();
        out.close();
    }

    static void fileInputOutput() {
        try {
            in = new FastReader("input.txt");
            out = new PrintWriter(new FileOutputStream("output.txt"));
        } catch (FileNotFoundException e) {
            throw new RuntimeException(e);
        }
    }

    static void runInThread() {
        Thread thread = new Thread(null, () -> {
            int T = 1;
//            T = in.nextInt();
            while (T-- > 0)
                solve();
        }, "thread1", 1 << 28);
        thread.start();
        try {
            thread.join();
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }
    }

    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        FastReader() {
            this(System.in);
        }
        FastReader(String file) throws FileNotFoundException {
            this(new FileInputStream(file));
        }
        FastReader(InputStream is) {
            br = new BufferedReader(new InputStreamReader(is));
        }

        int nextInt() {
            return Integer.parseInt(next());
        }
        long nextLong() {
            return Long.parseLong(next());
        }
        double nextDouble() {
            return Double.parseDouble(next());
        }
        String next() {
            while (st == null || !st.hasMoreTokens()) {
                st = new StringTokenizer(nextLine());
            }
            return st.nextToken();
        }
        String nextLine() {
            String line;
            try {
                line = br.readLine();
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
            return line;
        }
    }
}