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>
using namespace std;
int read() {
  int x = 0, f = 1;
  char ch = getchar();
  for (; ch < '0' || ch > '9'; ch = getchar())
    if (ch == '-') f = -1;
  for (; ch >= '0' && ch <= '9'; ch = getchar()) x = x * 10 + ch - '0';
  return x * f;
}
void write(int x) {
  if (x < 0)
    putchar('-'), write(-x);
  else {
    if (x >= 10) write(x / 10);
    putchar(x % 10 + '0');
  }
}
const int N = 2000020;
pair<int, int> Mx[N];
vector<int> g[N];
int fa[N], f[400010][22], L[N], R[N], x[N], y[N], u[N], v[N], tim[N], del[N],
    val[N], p[N];
int n, m, q, ind, fff;
int find(int x) { return x == fa[x] ? x : fa[x] = find(fa[x]); }
void dfs(int x) {
  L[x] = ind + 1;
  if (x <= n) ++ind, val[ind] = p[x];
  for (int i = (0); i < (g[x].size()); ++i) {
    int to = g[x][i];
    f[to][0] = x;
    dfs(to);
  }
  R[x] = ind;
}
void Clr(int l, int r, int p, int pos) {
  if (l == r) {
    Mx[p] = make_pair(0, l);
    return;
  }
  int mid = (l + r) >> 1;
  pos <= mid ? Clr(l, mid, p << 1, pos) : Clr(mid + 1, r, p << 1 | 1, pos);
  Mx[p] =
      (Mx[p << 1].first > Mx[p << 1 | 1].first) ? Mx[p << 1] : Mx[p << 1 | 1];
}
pair<int, int> Qry(int l, int r, int p, int s, int t) {
  if (t < l || r < s) return make_pair(0, 0);
  if (s <= l && r <= t) return Mx[p];
  int mid = (l + r) >> 1;
  pair<int, int> a = Qry(l, mid, p << 1, s, t),
                 b = Qry(mid + 1, r, p << 1 | 1, s, t);
  return (a.first < b.first) ? b : a;
}
void build(int l, int r, int p) {
  if (l == r) {
    Mx[p] = make_pair(val[l], l);
    return;
  }
  int mid = (l + r) >> 1;
  build(l, mid, p << 1), build(mid + 1, r, p << 1 | 1);
  Mx[p] =
      (Mx[p << 1].first > Mx[p << 1 | 1].first) ? Mx[p << 1] : Mx[p << 1 | 1];
}
int query(int x, int t) {
  for (int i = (20); i >= (0); --i)
    if (tim[f[x][i]] >= t) x = f[x][i];
  return x;
}
int main() {
  n = read(), m = read(), q = read();
  for (int i = (1); i <= (n); ++i) p[i] = read();
  for (int i = (1); i <= (m); ++i) x[i] = read(), y[i] = read();
  for (int i = (1); i <= (q); ++i) {
    u[i] = read(), v[i] = read();
    if (u[i] == 2) del[v[i]] = 1;
  }
  for (int i = (1); i <= (3 * n); ++i) fa[i] = i;
  for (int i = (1); i <= (m); ++i)
    if (!del[i]) fa[find(x[i])] = find(y[i]);
  fff = n;
  for (int i = (1); i <= (n); ++i) tim[i] = q + 1;
  for (int i = (1); i <= (n); ++i) {
    if (find(i) <= n) fa[find(i)] = ++fff, tim[fff] = q + 1;
    g[find(i)].push_back(i);
  }
  for (int i = (q); i >= (1); --i)
    if (u[i] == 2) {
      int a = find(x[v[i]]), b = find(y[v[i]]);
      if (a == b) continue;
      ++fff;
      g[fff].push_back(a);
      g[fff].push_back(b);
      tim[fff] = i;
      fa[a] = fa[b] = fff;
    }
  ++fff;
  for (int i = (1); i <= (fff - 1); ++i)
    if (find(i) != fff) g[fff].push_back(find(i)), fa[find(i)] = fff;
  dfs(fff);
  build(1, n, 1);
  for (int i = (1); i <= (20); ++i)
    for (int j = (1); j <= (n); ++j) f[j][i] = f[f[j][i - 1]][i - 1];
  for (int i = (1); i <= (q); ++i)
    if (u[i] == 1) {
      int gen = query(v[i], i);
      if (n == 96) {
        cout << tim[gen] << '~' << endl;
      }
      pair<int, int> ans = Qry(1, n, 1, L[gen], R[gen]);
      cout << ans.first << endl;
      Clr(1, n, 1, ans.second);
    } else {
      if (n == 96) cout << x[v[i]] << ' ' << y[v[i]] << endl;
    }
}
