#include <bits/stdc++.h>
using namespace std;
const int N = 5e5 + 7;
int fa[N], a[N], pos[N], size[N], vis[N], u[N], v[N], type[N], X[N], U, V, n, m,
    Q, i, j;
multiset<int> mx[N];
vector<int> q;
void merge(int x, int y, vector<int>& d) {
  if (size[x] > size[y]) swap(x, y);
  fa[x] = y;
  mx[y].insert(*mx[x].rbegin());
  size[y] += size[x];
  d.push_back(x);
}
void clear(int x) {
  int y = fa[x];
  mx[y].erase(mx[y].lower_bound(*mx[x].rbegin()));
  size[y] -= size[x];
  fa[x] = x;
}
int find(int x) {
  while (x != fa[x]) x = fa[x];
  return x;
}
void change(int x) {
  if (!x) return;
  int pre = a[x], now = 0;
  a[x] = 0;
  do {
    int tmppre = *mx[x].rbegin();
    mx[x].erase(mx[x].lower_bound(pre));
    mx[x].insert(now);
    now = *mx[x].rbegin();
    pre = tmppre;
  } while (x != fa[x] && (x = fa[x]));
}
int main() {
  for (scanf("%d%d%d", &n, &m, &Q), i = 1; i <= n; ++i)
    fa[i] = i, size[i] = 1, scanf("%d", &j), a[i] = j, pos[j] = i,
    mx[i].insert(j);
  for (i = 1; i <= m; ++i) scanf("%d%d", u + i, v + i);
  for (i = 1; i <= Q; ++i) {
    scanf("%d%d", type + i, X + i);
    if (type[i] == 2) vis[X[i]] = 1;
  }
  for (i = 1; i <= m; ++i)
    if (!vis[i] && (U = find(u[i])) != (V = find(v[i]))) merge(U, V, q);
  q.clear();
  memset(vis, 0, sizeof(vis));
  for (i = Q; i >= 1; --i)
    if (type[i] == 2 && (U = find(u[X[i]])) != (V = find(v[X[i]])))
      merge(U, V, q), vis[i] = 1;
  for (i = 1; i <= Q; ++i)
    if (type[i] == 1)
      printf("%d\n", j = *mx[find(X[i])].rbegin()), change(pos[j]);
    else if (vis[i])
      clear(q.back()), q.pop_back();
}
