#include <bits/stdc++.h>
using namespace std;
const int maxn = 1000005;
vector<int> edges[maxn];
int a[maxn], par[maxn], del[maxn];
int n, m, q;
pair<int, int> E[maxn], Q[maxn];
int get(int x) {
  if (par[x] == x)
    return x;
  else {
    return par[x] = get(par[x]);
  }
}
void unite(int x, int y) {
  x = get(x);
  y = get(y);
  if (x == y) return;
  ++n;
  par[n] = n;
  par[x] = n;
  par[y] = n;
  edges[n].push_back(x);
  edges[n].push_back(y);
}
int st[maxn], ed[maxn], timer = 0, vis[maxn], vert[maxn];
void dfs(int x) {
  vis[x] = 1;
  st[x] = ++timer;
  vert[timer] = x;
  for (auto i : edges[x]) {
    if (!vis[i]) {
      dfs(i);
    }
  }
  ed[x] = timer;
}
pair<int, int> t[maxn << 2];
void build(int node, int b, int e) {
  if (b == e) {
    t[node] = {a[vert[b]], b};
    return;
  }
  int mid = (b + e) >> 1;
  build(2 * node, b, mid);
  build(2 * node + 1, mid + 1, e);
  t[node] = max(t[2 * node], t[2 * node + 1]);
}
void upd(int node, int b, int e, int idx, int val) {
  if (idx > e or idx < b) return;
  if (b == idx && e == idx) {
    t[node] = {val, -1};
    return;
  }
  int mid = (b + e) >> 1;
  upd(2 * node, b, mid, idx, val);
  upd(2 * node + 1, mid + 1, e, idx, val);
  t[node] = max(t[2 * node], t[2 * node + 1]);
}
pair<int, int> query(int node, int b, int e, int i, int j) {
  if (i > e || j < b) return make_pair(0, -1);
  if (b >= i && j >= e) return t[node];
  int mid = (b + e) >> 1;
  return max(query(2 * node, b, mid, i, j),
             query(2 * node + 1, mid + 1, e, i, j));
}
int main(int argc, char const *argv[]) {
  scanf("%d %d %d", &n, &m, &q);
  for (int i = 1; i <= n; ++i) {
    scanf("%d", &a[i]);
  }
  for (int i = 1; i <= m; ++i) {
    scanf("%d %d", &E[i].first, &E[i].second);
  }
  for (int i = 1; i <= n; ++i) {
    par[i] = i;
  }
  for (int i = 1; i <= q; ++i) {
    scanf("%d %d", &Q[i].first, &Q[i].second);
    if (Q[i].first == 2) {
      del[Q[i].second] = 1;
    }
  }
  for (int i = 1; i <= m; ++i) {
    if (!del[i]) {
      unite(E[i].first, E[i].second);
    }
  }
  for (int i = q; i >= 1; --i) {
    if (Q[i].first == 1) {
      Q[i].second = get(Q[i].second);
    } else {
      unite(E[Q[i].second].first, E[Q[i].second].second);
    }
  }
  for (int i = 1; i <= n; ++i) {
    if (!vis[i]) {
      dfs(get(i));
    }
  }
  build(1, 1, n);
  for (int i = 1; i <= q; ++i) {
    if (Q[i].first == 1) {
      pair<int, int> ans = query(1, 1, n, st[Q[i].second], ed[Q[i].second]);
      if (ans.first == 0) {
        printf("0\n");
      } else {
        printf("%d\n", ans.first);
        upd(1, 1, n, ans.second, 0);
      }
    }
  }
  return 0;
}
