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.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastScanner in = new FastScanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskD solver = new TaskD();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskD {
        public void solve(int testNumber, FastScanner in, PrintWriter out) {
            int n = in.nextInt();
            int m = in.nextInt();
            int numQueries = in.nextInt();
            int[] p = new int[n];
            for (int i = 0; i < n; i++) {
                p[i] = -in.nextInt();
            }
            int[] a = new int[m];
            int[] b = new int[m];
            for (int i = 0; i < m; i++) {
                a[i] = in.nextInt() - 1;
                b[i] = in.nextInt() - 1;
            }
            int[] type = new int[numQueries];
            int[] val = new int[numQueries];
            boolean[] willDie = new boolean[m];
            for (int i = 0; i < numQueries; i++) {
                type[i] = in.nextInt();
                val[i] = in.nextInt() - 1;
                if (type[i] == 2) {
                    willDie[val[i]] = true;
                }
            }

            int[] parent = new int[n];
            Arrays.fill(parent, -1);
            DSU dsu = new DSU(n);
            Graph g = new Graph(n + 1);
            for (int i = 0; i < m; i++) {
                if (willDie[i]) {
                    continue;
                }
                int u = dsu.findComp(a[i]);
                int v = dsu.findComp(b[i]);
                if (u == v) {
                    continue;
                }
                dsu.merge(u, v);
                if (dsu.p[v] == u) {
                    int t = u;
                    u = v;
                    v = t;
                }
                parent[u] = v;
                g.addEdge(v, u, i);
            }

            for (int i = numQueries - 1; i >= 0; i--) {
                if (type[i] == 1) {
                    val[i] = dsu.findComp(val[i]);
                    continue;
                }
                int u = dsu.findComp(a[val[i]]);
                int v = dsu.findComp(b[val[i]]);
                if (u == v) {
                    continue;
                }
                dsu.merge(u, v);
                if (dsu.p[v] == u) {
                    int t = u;
                    u = v;
                    v = t;
                }
                parent[u] = v;
                g.addEdge(v, u, val[i]);
            }

            int root = n;
            for (int i = 0; i < n; i++) {
                if (parent[i] < 0) {
                    g.addEdge(root, i, -1);
                }
            }
            EulerTourNumbering et = new EulerTourNumbering(g, root);

            MinTree mt = new MinTree(n + 1);
            int[] q = new int[n + 1];
            for (int i = 0; i < n; i++) {
                q[et.timeIn[i]] = p[i];
                mt.set(et.timeIn[i], p[i]);
            }

            boolean[] dead = new boolean[m];
            int[] left = new int[n + 1];
            int[] right = new int[n + 1];
            for (int i = 0; i < left.length; i++) {
                left[i] = et.timeIn[i];
                right[i] = et.timeOut[i] - 1;
            }
            for (int i = 0; i < numQueries; i++) {
                if (type[i] == 2) {
                    dead[val[i]] = true;
                    continue;
                }
                int r = val[i];
                for (int e = g.firstEdge[val[i]]; e >= 0; e = g.edgeNxt[e]) {
                    int origId = g.edgeId[e];
                    int dst = g.edgeDst[e];
                    if (dead[origId]) {
                        if (e != g.firstEdge[val[i]]) {
                            throw new AssertionError();
                        }
                        g.firstEdge[val[i]] = g.edgeNxt[e];
                        left[val[i]] = et.timeOut[dst];
                    } else {
                        break;
                    }
                }
                int pos = et.timeIn[r];
                if (left[r] <= right[r]) {
                    int cand = mt.getMinPos(left[r], right[r]);
                    if (q[pos] > q[cand]) {
                        pos = cand;
                    }
                }
                out.println(-q[pos]);
                q[pos] = 0;
                mt.set(pos, 0);
            }
        }

        class EulerTourNumbering {
            Graph g;
            int[] tour;
            int[] timeIn;
            int[] timeOut;
            int globalTime;

            EulerTourNumbering(Graph g, int root) {
                this.g = g;
                int n = g.n;
                timeIn = new int[n];
                timeOut = new int[n];
                tour = new int[n];

                dfs(root, -1);
                if (globalTime != n) {
                    throw new AssertionError();
                }
            }

            void dfs(int v, int p) {
                tour[globalTime] = v;
                timeIn[v] = globalTime++;
                for (int e = g.firstEdge[v]; e >= 0; e = g.edgeNxt[e]) {
                    int u = g.edgeDst[e];
                    if (u == p) {
                        continue;
                    }
                    dfs(u, v);
                }
                timeOut[v] = globalTime;
            }

        }

        class Graph {
            int n;
            int[] firstEdge;
            int[] edgeDst;
            int[] edgeNxt;
            int[] edgeId;
            int numEdges;

            Graph(int n) {
                this.n = n;
                firstEdge = new int[n];
                Arrays.fill(firstEdge, -1);
                final int initialCapacity = 2 * n - 2;
                edgeDst = new int[initialCapacity];
                edgeNxt = new int[initialCapacity];
                edgeId = new int[initialCapacity];
                numEdges = 0;
            }

            void addEdge(int a, int b, int origId) {
                int e = numEdges++;
                if (e >= edgeDst.length) {
                    reallocate();
                }
                edgeDst[e] = b;
                edgeNxt[e] = firstEdge[a];
                firstEdge[a] = e;
                edgeId[e] = origId;
            }

            private void reallocate() {
                int k = edgeDst.length;
                edgeDst = Arrays.copyOf(edgeDst, 3 * k / 2);
                edgeNxt = Arrays.copyOf(edgeNxt, 3 * k / 2);
                edgeId = Arrays.copyOf(edgeId, 3 * k / 2);
            }

        }

        class MinTree {
            int n;
            int[] a;
            int[] where;
            final int infinity = (int) 1e9;

            MinTree(int size) {
                n = 1;
                while (n < size) {
                    n *= 2;
                }
                a = new int[2 * n];
                where = new int[2 * n];
                Arrays.fill(a, infinity);
            }

            void set(int pos, int val) {
                pos += n;
                a[pos] = val;
                where[pos] = pos - n;
                while (pos > 1) {
                    pos /= 2;
                    a[pos] = Math.min(a[2 * pos], a[2 * pos + 1]);
                    if (a[pos] == a[2 * pos]) {
                        where[pos] = where[2 * pos];
                    } else {
                        where[pos] = where[2 * pos + 1];
                    }
                }
            }

            int getMinPos(int l, int r) {
                if (l > r) {
                    return infinity;
                }
                l += n;
                r += n;
                if (l == r) {
                    return where[l];
                }
                int lm = a[l];
                int rm = a[r];
                int lp = where[l];
                int rp = where[r];
                while (r - l > 1) {
                    if (l % 2 == 0) {
                        if (lm > a[l + 1]) {
                            lm = a[l + 1];
                            lp = where[l + 1];
                        }
                    }
                    if (r % 2 != 0) {
                        if (rm > a[r - 1]) {
                            rm = a[r - 1];
                            rp = where[r - 1];
                        }
                    }
                    l /= 2;
                    r /= 2;
                }
                return lm < rm ? lp : rp;
            }

        }

        class DSU {
            int[] rank;
            int[] p;
            int numComps;

            DSU(int n) {
                rank = new int[n];
                p = new int[n];
                reset();
            }

            void reset() {
                for (int i = 0; i < p.length; i++) {
                    rank[i] = 0;
                    p[i] = i;
                }
                numComps = p.length;
            }

            private int findComp(int x) {
                int r;
                int saved;

                saved = x;
                while (x != p[x]) {
                    x = p[x];
                }
                r = x;

                x = saved;
                while (x != r) {
                    saved = p[x];
                    p[x] = r;
                    x = saved;
                }
                return r;
            }

            private void merge(int a, int b) {
                a = findComp(a);
                b = findComp(b);
                if (a == b) {
                    return;
                }
                --numComps;
                if (rank[a] < rank[b]) {
                    p[a] = b;
                } else {
                    p[b] = a;
                    if (rank[a] == rank[b]) {
                        ++rank[a];
                    }
                }
            }

        }

    }

    static class FastScanner {
        private BufferedReader in;
        private StringTokenizer st;

        public FastScanner(InputStream stream) {
            in = new BufferedReader(new InputStreamReader(stream));
        }

        public String next() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(in.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return st.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

    }
}

