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[200010], g[200010];
bool del[300010];
pair<int, int> edge[300010], query[500010], split[300010];
set<int> S[200010];
vector<int> mergeList[200010];
int find(int u) {
  if (g[u] > 0) {
    g[u] = find(g[u]);
    return g[u];
  }
  return u;
}
void buildSet(int u) {
  S[u].insert(p[u]);
  for (int v : mergeList[u]) {
    for (int pv : S[v]) {
      S[u].insert(pv);
    }
  }
}
void merge(int u, int v, int k) {
  u = find(u);
  v = find(v);
  if (u == v) {
    split[k] = pair<int, int>(0, 0);
  } else if (g[u] < g[v]) {
    split[k] = pair<int, int>(u, v);
    buildSet(v);
    mergeList[u].push_back(v);
    g[u] += g[v];
    g[v] = u;
  } else {
    split[k] = pair<int, int>(v, u);
    buildSet(u);
    mergeList[v].push_back(u);
    g[v] += g[u];
    g[u] = v;
  }
}
void handleQuery(int v) {
  int gv = find(v);
  if (S[gv].empty()) {
    cout << 0 << endl;
  } else {
    auto it = S[gv].rbegin();
    cout << *it << endl;
    S[gv].erase(*it);
  }
}
void handleSplit(int k) {
  int u = split[k].first, v = split[k].second;
  if (u == 0) {
    return;
  }
  vector<int> splitList;
  for (int pv : S[v]) {
    splitList.push_back(k);
  }
  for (int pv : splitList) {
    if (S[u].count(pv)) {
      S[u].erase(pv);
    } else {
      S[v].erase(pv);
    }
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n, m, q;
  cin >> n >> m >> q;
  for (int i = 1; i <= n; i++) {
    cin >> p[i];
    g[i] = -1;
  }
  int u, v;
  for (int i = 1; i <= m; i++) {
    cin >> u >> v;
    edge[i] = pair<int, int>(u, v);
    del[i] = false;
  }
  for (int i = 1; i <= q; i++) {
    int qt;
    cin >> qt >> v;
    if (qt == 2) {
      del[v] = true;
    }
    query[i] = pair<int, int>(qt, v);
  }
  for (int i = 1; i <= m; i++) {
    if (del[i]) {
      continue;
    }
    u = edge[i].first, v = edge[i].second;
    merge(u, v, i);
  }
  for (int i = q; i >= 1; i--) {
    int qt = query[i].first;
    if (qt == 2) {
      int e = query[i].second;
      u = edge[e].first, v = edge[e].second;
      merge(u, v, e);
    }
  }
  for (int i = 1; i <= n; i++) {
    int gr = find(i);
    S[gr].insert(p[i]);
  }
  for (int i = 1; i <= q; i++) {
    int qt = query[i].first;
    if (qt == 1) {
      v = query[i].second;
      handleQuery(v);
    } else {
      int k = query[i].second;
      handleSplit(k);
    }
  }
  return 0;
}
