#include <bits/stdc++.h>
using namespace std;
const int MAXN = 5e5 + 10;
int u[MAXN], v[MAXN], per[MAXN];
int su[MAXN], sv[MAXN];
bool rmv[MAXN];
int p[MAXN];
int n, m, q;
int qi[MAXN], val[MAXN], sz[MAXN];
int find(int x) {
  if (p[x] == x) return x;
  return p[x] = find(p[x]);
}
void join(int x, int y) {
  sz[find(y)] += sz[find(x)];
  p[find(x)] = find(y);
}
bool out[MAXN];
set<int> S[MAXN];
int ss;
int where[MAXN];
vector<pair<int, int> > g[MAXN];
bool V[MAXN];
int vis;
void dfs(int cur, int prev, int to) {
  V[cur] = true;
  where[cur] = to;
  S[to].insert(cur);
  for (int i = 0; i < (int)g[cur].size(); i++) {
    int next = g[cur][i].first;
    if (next == prev) continue;
    dfs(next, cur, to);
  }
}
void dfs1(int cur, int prev, int from, int to) {
  vis++;
  S[from].erase(cur);
  if (!out[cur])
    S[to].insert(cur);
  else
    S[to].insert(0);
  where[cur] = to;
  for (int i = 0; i < (int)g[cur].size(); i++) {
    if (rmv[g[cur][i].second]) continue;
    int next = g[cur][i].first;
    if (next == prev) continue;
    dfs1(next, cur, from, to);
  }
}
int main() {
  scanf("%d %d %d", &n, &m, &q);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &per[i]);
    p[i] = i;
    sz[i] = 1;
  }
  for (int i = 1; i <= m; i++) {
    scanf("%d %d", &u[i], &v[i]);
    u[i] = per[u[i]];
    v[i] = per[v[i]];
  }
  for (int i = 0; i < q; i++) {
    scanf("%d %d", &qi[i], &val[i]);
    if (qi[i] == 2)
      rmv[val[i]] = true;
    else
      val[i] = per[val[i]];
  }
  for (int i = 1; i <= m; i++) {
    if (rmv[i]) continue;
    if (find(u[i]) == find(v[i])) continue;
    join(u[i], v[i]);
  }
  for (int i = q - 1; i >= 0; i--) {
    if (qi[i] == 2) {
      int x = u[val[i]], y = v[val[i]];
      if (find(x) == find(y)) {
        su[i] = sv[i] = -1;
        continue;
      }
      su[i] = sz[find(x)];
      sv[i] = sz[find(y)];
      g[x].push_back(make_pair(y, val[i]));
      g[y].push_back(make_pair(x, val[i]));
      join(x, y);
    }
  }
  for (int i = 1; i <= n; i++) {
    p[i] = i;
    sz[i] = 1;
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 0; j < (int)g[i].size(); j++) {
      int x = i, y = g[i][j].first;
      join(x, y);
    }
  }
  for (int i = 1; i <= m; i++) {
    if (rmv[i]) continue;
    int x = u[i], y = v[i];
    if (find(x) == find(y)) continue;
    g[x].push_back(make_pair(y, i));
    g[y].push_back(make_pair(x, i));
    join(x, y);
  }
  ss = 0;
  memset(V, false, sizeof V);
  for (int i = 1; i <= n; i++) {
    if (!V[i]) dfs(i, i, ss++);
  }
  for (int i = 1; i <= m; i++) rmv[i] = false;
  for (int i = 0; i < q; i++) {
    if (qi[i] == 1) {
      int cur = val[i];
      int w = where[cur];
      int ans = *S[w].rbegin();
      printf("%d\n", ans);
      if (ans) {
        out[ans] = true;
        S[w].erase(ans);
        S[w].insert(0);
      }
    } else {
      rmv[val[i]] = true;
      if (su[i] == -1) continue;
      int ei = val[i];
      if (su[i] < sv[i]) {
        vis = 0;
        dfs1(u[ei], u[ei], where[u[ei]], ss++);
        if (vis != su[i]) {
          printf("%d %d\n", vis, su[i]);
          return 0;
        }
      } else {
        vis = 0;
        dfs1(v[ei], v[ei], where[v[ei]], ss++);
        if (vis != sv[i]) {
          printf("%d %d\n", vis, sv[i]);
          return 0;
        }
      }
    }
  }
  return 0;
}
