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;
template <class T>
void chkmin(T &x, T &y) {
  if (y < x) x = y;
}
template <class T>
void chkmax(T &x, T &y) {
  if (y > x) x = y;
}
inline void read(int &x) {
  register char ch = getchar();
  x = 0;
  while (!isdigit(ch)) ch = getchar();
  while (isdigit(ch)) x = x * 10 + (ch ^ 48), ch = getchar();
}
const int N = 200005, M = 300005, Q = 500005;
int n, m, q, opt[Q], c1[Q], p[N], x, y;
int bcj[N], bcj2[N], siz[N], top;
priority_queue<int> pq[N];
set<pair<int, int> > s[N];
pair<int, int> e[M], sta[N];
bool del[M], bo[Q], used[M];
int ask(int x) { return bcj[x] == x ? x : bcj[x] = ask(bcj[x]); }
int ask2(int x) { return bcj2[x] == x ? x : ask2(bcj2[x]); }
void merge(int x, int y) {
  if (siz[x] < siz[y]) swap(x, y);
  bcj2[y] = x;
  siz[x] += y;
  for (auto o : s[y]) s[x].insert(o);
  sta[++top] = {x, y};
}
void ctrlz() {
  int x = sta[top].first, y = sta[top].second;
  top--;
  bcj2[y] = y;
  siz[x] -= y;
  for (auto o : s[y]) s[x].erase(o);
}
int query(int x) {
  if (s[x].empty()) return 0;
  pair<int, int> o = *s[x].begin();
  int y = o.second, res = -o.first;
  for (int i = y; i != x; i = bcj2[i]) s[i].erase(o);
  s[x].erase(o);
  pq[y].pop();
  if (!pq[y].empty()) {
    o = {-pq[y].top(), y};
    for (int i = y; i != x; i = bcj2[i]) s[i].insert(o);
    s[x].insert(o);
  }
  return res;
}
int main() {
  scanf("%d%d%d", &n, &m, &q);
  for (int i = 1; i <= (n); i++) scanf("%d", p + i), bcj[i] = i;
  for (int i = 1; i <= (m); i++) scanf("%d%d", &x, &y), e[i] = {x, y};
  for (int i = 1; i <= (q); i++) {
    scanf("%d%d", opt + i, c1 + i);
    if (opt[i] == 2) del[c1[i]] = 1;
  }
  for (int i = 1; i <= (m); i++)
    if (!del[i]) {
      x = ask(e[i].first);
      y = ask(e[i].second);
      if (x != y) bcj[x] = y;
    }
  for (int i = 1; i <= (n); i++) pq[ask(i)].push(p[i]);
  for (int i = 1; i <= (n); i++)
    if (i == ask(i)) {
      bcj2[i] = i;
      siz[i] = 1;
      s[i].insert({-pq[i].top(), i});
    }
  for (int i = q; i >= (1); i--)
    if (opt[i] == 2) {
      x = ask2(ask(e[c1[i]].first));
      y = ask2(ask(e[c1[i]].second));
      if (x != y) merge(x, y), bo[i] = 1;
    }
  for (int i = 1; i <= (q); i++) {
    if (opt[i] == 1)
      printf("%d\n", query(ask2(ask(c1[i]))));
    else if (bo[i])
      ctrlz();
  }
}
