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 p[200005];
int z[200005];
int a[300005], b[300005];
int t[500005], r[500005];
bool f[300005];
int sz[200005];
int par[200005];
int mx[200005];
set<int, greater<int>> ch[200005];
int main() {
  int n, m, q;
  scanf("%d %d %d", &n, &m, &q);
  for (int i = 0; i < n; i++) {
    scanf("%d", &p[i]);
    z[p[i]] = i;
  }
  for (int i = 0; i < m; i++) {
    scanf("%d %d", &a[i], &b[i]);
    a[i]--;
    b[i]--;
  }
  for (int i = 0; i < q; i++) {
    scanf("%d %d", &t[i], &r[i]);
    r[i]--;
    if (t[i] == 2) f[r[i]] = true;
  }
  for (int i = 0; i < n; i++) {
    sz[i] = 1;
    par[i] = i;
    mx[i] = p[i];
  }
  for (int i = 0; i < m; i++) {
    if (f[i]) continue;
    int u = a[i], v = b[i];
    while (par[u] != u) u = par[u];
    while (par[v] != v) v = par[v];
    if (u == v) continue;
    if (sz[u] < sz[v]) {
      par[u] = v;
      ch[v].insert(mx[u]);
      mx[v] = max(mx[v], mx[u]);
      sz[v] += sz[u];
    } else {
      par[v] = u;
      ch[u].insert(mx[v]);
      mx[u] = max(mx[u], mx[v]);
      sz[u] += sz[v];
    }
  }
  vector<int> add;
  vector<pair<int, int>> addp;
  for (int i = q - 1; i >= 0; i--) {
    if (t[i] == 1) continue;
    int u = a[r[i]], v = b[r[i]];
    while (par[u] != u) u = par[u];
    while (par[v] != v) v = par[v];
    if (u == v) continue;
    add.push_back(i);
    addp.push_back(pair<int, int>(u, v));
    if (sz[u] < sz[v]) {
      par[u] = v;
      ch[v].insert(mx[u]);
      mx[v] = max(mx[v], mx[u]);
      sz[v] += sz[u];
    } else {
      par[v] = u;
      ch[u].insert(mx[v]);
      mx[u] = max(mx[u], mx[v]);
      sz[u] += sz[v];
    }
  }
  reverse(add.begin(), add.end());
  reverse(addp.begin(), addp.end());
  int c = 0;
  for (int i = 0; i < q; i++) {
    if (c < (int)add.size() && add[c] == i) {
      int u = addp[c].first, v = addp[c].second;
      c++;
      if (par[u] == v) swap(u, v);
      ch[u].erase(mx[v]);
      par[v] = v;
      int temp = mx[u];
      mx[u] = p[u];
      if (ch[u].size()) mx[u] = max(mx[u], *ch[u].begin());
      if (mx[u] == temp) continue;
      while (par[u] != u) {
        ch[par[u]].erase(temp);
        ch[par[u]].insert(mx[u]);
        temp = mx[par[u]];
        mx[par[u]] = max(p[par[u]], *ch[par[u]].begin());
        if (mx[par[u]] == temp) break;
        u = par[u];
      }
    } else if (t[i] == 1) {
      int u = r[i];
      while (par[u] != u) u = par[u];
      printf("%d\n", mx[u]);
      if (mx[u] == 0) continue;
      int v = z[mx[u]];
      p[v] = 0;
      mx[v] = 0;
      if (ch[v].size()) mx[v] = *ch[v].begin();
      while (par[v] != v) {
        ch[par[v]].erase(mx[par[v]]);
        ch[par[v]].insert(mx[v]);
        mx[par[v]] = max(p[par[v]], *ch[par[v]].begin());
        v = par[v];
      }
    }
  }
}
