#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;
}
