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;
const int MAXN = (int)5e5 + 5;
const int MAXM = (int)3e5 + 5;
const int MAXQ = (int)5e5 + 5;
pair<int, int> e[MAXM], que[MAXQ], t[MAXN << 2];
vector<int> adj[MAXN];
int tin[MAXN], tout[MAXN], timer;
int par[MAXN], arr[MAXN];
bool del[MAXM];
int n, m, q;
int xyxxyyx(int x) {
  if (x == par[x]) {
    return x;
  }
  return par[x] = xyxxyyx(par[x]);
}
void uni(int a, int b) {
  a = xyxxyyx(a);
  b = xyxxyyx(b);
  if (a == b) {
    return;
  }
  ++n;
  par[n] = n;
  par[a] = n;
  par[b] = n;
  adj[n].push_back(a);
  adj[n].push_back(b);
}
void dfs(int v) {
  tin[v] = ++timer;
  for (int to : adj[v]) {
    dfs(to);
  }
  tout[v] = timer;
}
pair<int, int> fdfeff(int v, int tl, int tr, int l, int r) {
  if (l > r || tl > r || tr < l) {
    return make_pair(0, 0);
  }
  if (l <= tl && tr <= r) {
    return t[v];
  }
  int mid = (tl + tr) >> 1;
  int c1 = (v << 1), c2 = (c1 | 1);
  return max(fdfeff(c1, tl, mid, l, r), fdfeff(c2, mid + 1, tr, l, r));
}
void fdfefrgegefef(int v, int tl, int tr, int p, pair<int, int> x) {
  if (tl == tr) {
    t[v] = x;
    return;
  }
  int mid = (tl + tr) >> 1;
  int c1 = (v << 1), c2 = (c1 | 1);
  if (p <= mid) {
    fdfefrgegefef(c1, tl, mid, p, x);
  } else {
    fdfefrgegefef(c2, mid + 1, tr, p, x);
  }
  t[v] = max(t[c1], t[c2]);
}
void solve() {
  scanf("%d %d %d", &n, &m, &q);
  for (int i = 1; i <= n; ++i) {
    scanf("%d", &arr[i]);
  }
  for (int i = 1; i <= m; ++i) {
    int u, v;
    scanf("%d %d", &u, &v);
    e[i] = make_pair(u, v);
  }
  for (int i = 1; i <= q; ++i) {
    int a, b;
    scanf("%d %d", &a, &b);
    que[i] = make_pair(a, b);
    if (a == 2) {
      del[b] = 1;
    }
  }
  for (int i = 1; i <= n; ++i) {
    par[i] = i;
  }
  for (int i = 1; i <= m; ++i) {
    if (!del[i]) {
      uni(e[i].first, e[i].second);
    }
  }
  for (int i = q; i > 0; --i) {
    int tp = que[i].first;
    if (tp == 2) {
      int id = que[i].second;
      uni(e[id].first, e[id].second);
    } else {
      que[i].second = xyxxyyx(que[i].second);
    }
  }
  for (int i = 1; i <= n; ++i) {
    if (xyxxyyx(i) == i) {
      dfs(i);
    }
  }
  for (int i = 1; i <= n; ++i) {
    fdfefrgegefef(1, 1, n, tin[i], make_pair(arr[i], tin[i]));
  }
  for (int i = 1; i <= q; ++i) {
    int tp = que[i].first;
    if (tp == 1) {
      int v = que[i].second;
      pair<int, int> tmp = fdfeff(1, 1, n, tin[v], tout[v]);
      if (tmp.first == 0) {
        printf("0\n");
      } else {
        printf("%d\n", tmp.first);
        fdfefrgegefef(1, 1, n, tmp.second, make_pair(0, 0));
      }
    }
  }
}
int main() {
  int tt = 1;
  while (tt--) {
    solve();
  }
  return 0;
}
