#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int>> e;
vector<int> op, num;
int main() {
  int n, m, q;
  scanf("%d%d%d", &n, &m, &q);
  vector<int> p(n);
  for (int i = 0; i < n; ++i) scanf("%d", &p[i]);
  for (int i = 0, x, y; i < m; ++i) {
    scanf("%d%d", &x, &y), --x, --y;
    e.emplace_back(make_pair(x, y));
  }
  vector<int> del(m);
  for (int i = 0, x, y; i < q; ++i) {
    scanf("%d%d", &x, &y), --y;
    op.emplace_back(x);
    num.emplace_back(y);
    if (x == 2) del[y] = 1;
  }
  for (int i = 0; i < m; ++i)
    if (!del[i]) {
      op.emplace_back(2);
      num.emplace_back(i);
    }
  q = (int)op.size();
  vector<int> pre(n);
  vector<vector<int>> cnt(n);
  for (int i = 0; i < n; ++i) {
    pre[i] = i;
    cnt[i] = {i};
  }
  vector<vector<int>> cnt1(q);
  vector<int> pre1(q);
  for (int i = q - 1; i >= 0; --i)
    if (op[i] == 2) {
      int x = e[num[i]].first, y = e[num[i]].second;
      if (pre[x] == pre[y]) continue;
      x = pre[x];
      y = pre[y];
      if (cnt[y].size() > cnt[x].size()) swap(x, y);
      pre1[i] = y;
      cnt1[i] = cnt[y];
      for (auto v : cnt[y]) {
        cnt[x].emplace_back(v);
        pre[v] = x;
      }
      cnt[y] = {};
    }
  vector<set<int>> w(n);
  for (int i = 0; i < n; ++i) w[pre[i]].insert(p[i]);
  for (int i = 0; i < q; ++i) {
    if (op[i] == 1) {
      int x = pre[num[i]];
      if (w[x].empty())
        printf("0\n");
      else {
        printf("%d\n", *(--w[x].end()));
        w[x].erase(--w[x].end());
      }
    } else {
      int x = pre[e[num[i]].first];
      int y = pre1[i];
      for (auto v : cnt1[i]) {
        if (w[x].count(p[v])) {
          w[x].erase(p[v]);
          w[y].insert(p[v]);
        }
        pre[v] = y;
      }
    }
  }
  return 0;
}
