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[200003];
vector<int> ds[200004];
int st[200003];
multiset<pair<int, int>> ms[200004];
pair<int, int> ed[300004];
struct UnmergeOp {
  int cnt;
  int src;
  int dest;
};
UnmergeOp unm[500002];
void unmerge(int op) {
  if (unm[op].cnt == 0) return;
  while (unm[op].cnt--) {
    auto [_, src, dest] = unm[op];
    int b = ds[src].back();
    ds[src].pop_back();
    ms[src].erase(ms[src].find({p[b], b}));
    st[b] = dest;
    ds[dest].push_back(b);
    ms[dest].insert({p[b], b});
  }
}
void merge(int loc, int x, int y) {
  int sx = st[x];
  int sy = st[y];
  if (sx == sy) return;
  if (ds[sx].size() < ds[sy].size()) swap(sx, sy);
  int cc = 0;
  while (!ds[sy].empty()) {
    auto tp = ds[sy].back();
    ds[sy].pop_back();
    st[tp] = sx;
    ds[sx].push_back(tp);
    cc++;
  }
  if (loc != -1) {
    unm[loc].cnt = cc;
    unm[loc].src = sx;
    unm[loc].dest = sy;
  }
}
int main() {
  int n, m, q;
  scanf("%d %d %d", &n, &m, &q);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &p[i]);
    ds[i].push_back(i);
    st[i] = i;
  }
  set<int> initial;
  for (int i = 1; i <= m; i++) {
    initial.insert(i);
    scanf("%d %d", &ed[i].first, &ed[i].second);
  }
  vector<std::pair<int, int>> qs;
  while (q--) {
    int type;
    int x;
    scanf("%d %d", &type, &x);
    qs.push_back({type, x});
    if (type == 2) initial.erase(x);
  }
  for (int e : initial) {
    merge(-1, ed[e].first, ed[e].second);
  }
  vector<int> ans;
  for (int i = (int)qs.size() - 1; i >= 0; i--) {
    if (qs[i].first == 2) {
      merge(i, ed[qs[i].second].first, ed[qs[i].second].second);
    }
  }
  for (int i = 1; i <= n; i++) {
    for (int x : ds[i]) {
      ms[i].insert({p[x], x});
    }
  }
  for (int i = 0; i < (int)qs.size(); i++) {
    if (qs[i].first == 1) {
      int s = st[qs[i].second];
      auto it = ms[s].end();
      it--;
      printf("%d\n", it->first);
      p[it->second] = 0;
      ms[s].erase(*it);
      ms[s].insert({0, it->second});
    } else {
      unmerge(i);
    }
  }
  return 0;
}
