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>
template <typename Tp>
void read(Tp &res) {
  static char ch;
  ch = getchar(), res = 0;
  while (!isdigit(ch)) ch = getchar();
  while (isdigit(ch)) res = res * 10 + ch - 48, ch = getchar();
}
const int MAXN = 2e5 + 19, MAXM = 3e5 + 19, MAXQ = 5e5 + 19;
int n, m, q, fa[MAXN], birth[MAXM], belong[MAXN], p[MAXN], opt[MAXQ], arg[MAXQ];
int getf(int node) {
  return node == fa[node] ? node : fa[node] = getf(fa[node]);
}
std::vector<int> mt[MAXN];
std::pair<int, int> G[MAXM];
bool vist[MAXM];
int main() {
  read(n), read(m), read(q);
  for (int i = 1; i <= n; ++i) read(p[i]), fa[i] = i, mt[i].push_back(i);
  for (int i = 1; i <= m; ++i) read(G[i].first), read(G[i].second);
  for (int i = 1; i <= q; ++i) {
    read(opt[i]), read(arg[i]);
    if (opt[i] == 2) vist[arg[i]] = 1;
  }
  for (int i = 1; i <= m; ++i) {
    if (vist[i]) continue;
    int a = G[i].first, b = G[i].second;
    a = getf(a), b = getf(b);
    if (a == b) continue;
    if (mt[a].size() < mt[b].size()) std::swap(a, b);
    for (int j : mt[b]) mt[a].push_back(j);
    std::vector<int>().swap(mt[b]);
    fa[b] = a;
  }
  for (int i = q; i >= 1; --i)
    if (opt[i] == 2) {
      int a = G[arg[i]].first, b = G[arg[i]].second;
      a = getf(a), b = getf(b);
      if (a == b) continue;
      if (mt[a].size() < mt[b].size()) std::swap(a, b);
      birth[arg[i]] = b;
      for (int j : mt[b]) mt[a].push_back(j);
      fa[b] = a;
    }
  for (int i = 1; i <= n; ++i) belong[i] = getf(i), vist[i] = 0;
  for (int i = 1; i <= n; ++i)
    std::sort(mt[i].begin(), mt[i].end(),
              [](const int &a, const int &b) { return p[a] < p[b]; });
  for (int i = 1; i <= q; ++i) {
    if (opt[i] == 1) {
      int a = belong[arg[i]];
      while (!mt[a].empty() &&
             (belong[mt[a].back()] != a || vist[mt[a].back()]))
        mt[a].pop_back();
      if (mt[a].empty())
        puts("0");
      else
        printf("%d\n", p[mt[a].back()]), vist[mt[a].back()] = 1;
    } else {
      int a = birth[arg[i]];
      if (!a) continue;
      for (int j : mt[a]) belong[j] = a;
    }
  }
  return 0;
}
