#include <bits/stdc++.h>
using namespace std;
const int maxn = 5e5 + 100;
int p[maxn];
pair<int, int> g[maxn];
map<int, int> mp;
pair<int, int> Q[maxn];
set<pair<int, int>> st[maxn];
bool vis[maxn];
struct UFS {
  int rt[maxn], sz[maxn];
  void init() {
    for (int i = 0; i < maxn; i++) rt[i] = i, sz[i] = 1;
  }
  int Find(int x) {
    while (x != rt[x]) x = rt[x];
    return x;
  }
  void Merge(int x, int y, stack<pair<int, int>>& stk) {
    x = Find(x), y = Find(y);
    if (x == y) {
      stk.push({0, 0});
      return;
    }
    if (sz[x] > sz[y]) swap(x, y);
    for (auto it : st[x]) {
      if (!vis[it.second]) st[y].insert(it);
    }
    rt[x] = y, sz[y] += sz[x];
    stk.push({x, y});
  }
  void Cancel(stack<pair<int, int>>& stk) {
    if (!stk.empty()) {
      int x = stk.top().first, y = stk.top().second;
      stk.pop();
      if (x == y && x == 0) return;
      set<pair<int, int>> stt;
      for (auto it : st[x]) {
        if (st[y].find(it) != st[y].end()) {
          st[y].erase(it);
          if (!vis[it.second]) stt.insert(it);
        }
      }
      st[x].clear();
      st[x] = stt;
      rt[x] = x, sz[y] -= sz[x];
    }
  }
} ufs;
stack<pair<int, int>> stk;
int main() {
  ufs.init();
  int n, m, q;
  scanf("%d%d%d", &n, &m, &q);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &p[i]);
    st[i].insert({p[i], i});
  }
  for (int i = 1; i <= m; i++) {
    scanf("%d%d", &g[i].first, &g[i].second);
  }
  for (int i = 1; i <= q; i++) {
    scanf("%d%d", &Q[i].first, &Q[i].second);
    if (Q[i].first == 2) mp[Q[i].second] = 1;
  }
  for (int i = 1; i <= m; i++) {
    if (mp.count(i) == 0) ufs.Merge(g[i].first, g[i].second, stk);
  }
  for (int i = q; i >= 1; i--) {
    if (Q[i].first == 2)
      ufs.Merge(g[Q[i].second].first, g[Q[i].second].second, stk);
  }
  for (int i = 1; i <= q; i++) {
    if (Q[i].first == 1) {
      int x = ufs.Find(Q[i].second);
      if (st[x].size() == 0) {
        puts("0");
        continue;
      }
      auto it = st[x].end();
      --it;
      int flag = 0;
      while (!flag) {
        if (!vis[(*it).second]) {
          flag = (*it).first;
          vis[(*it).second] = 1;
          st[x].erase(it);
          break;
        } else {
          if (it == st[x].begin())
            break;
          else
            it--;
        }
      }
      printf("%d\n", flag);
    } else {
      ufs.Cancel(stk);
    }
  }
  return 0;
}
