#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 2e6 + 20;
const int INF = 0x3f3f3f3f;
int n, m, q;
int arr[MAX_N];
pair<int, int> e[MAX_N], que[MAX_N];
int del[MAX_N];
int par[MAX_N];
int tin[MAX_N], tout[MAX_N];
int tree[MAX_N * 4];
vector<int> V[MAX_N];
int vis[MAX_N];
int find_p(int x) {
  if (par[x] == x)
    return x;
  else {
    return par[x] = find_p(par[x]);
  }
}
void unite(int x, int y) {
  x = find_p(x), y = find_p(y);
  if (x == y) return;
  n++;
  par[n] = n;
  par[x] = n, par[y] = n;
  V[n].push_back(x), V[n].push_back(y);
}
void update(int nod, int l, int r, int k, int v) {
  if (l == r) {
    tree[nod] = v;
    return;
  }
  int mid = (l + r) / 2;
  if (k <= mid) {
    update(nod * 2, l, mid, k, v);
  } else {
    update(nod * 2 + 1, mid + 1, r, k, v);
  }
  tree[nod] = max(tree[nod * 2], tree[nod * 2 + 1]);
}
int query(int nod, int l, int r, int ll, int rr) {
  if (l == ll && r == rr) {
    return tree[nod];
  }
  int mid = (l + r) / 2;
  if (mid >= rr) {
    return query(nod * 2, l, mid, ll, rr);
  } else if (mid < ll) {
    return query(nod * 2 + 1, mid + 1, r, ll, rr);
  } else {
    return max(query(nod * 2, l, mid, ll, mid),
               query(nod * 2 + 1, mid + 1, r, mid + 1, rr));
  }
}
int t = 0;
void dfs(int u) {
  tin[u] = ++t;
  for (auto v : V[u]) {
    if (tin[v]) continue;
    dfs(v);
  }
  tout[u] = t;
}
int M[MAX_N];
int main() {
  scanf("%d%d%d", &n, &m, &q);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &arr[i]);
    M[arr[i]] = i;
  }
  for (int i = 1; i <= n; i++) par[i] = i;
  int x, y;
  for (int i = 1; i <= m; i++) {
    scanf("%d%d", &x, &y);
    e[i] = pair<int, int>(x, y);
  }
  for (int i = 1; i <= q; i++) {
    scanf("%d%d", &x, &y);
    que[i] = pair<int, int>(x, y);
    if (x == 2) {
      del[y] = 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 (que[i].first == 2) {
      int v = que[i].second;
      unite(e[v].first, e[v].second);
    } else {
      que[i].second = find_p(que[i].second);
    }
  }
  for (int i = 1; i <= n; i++) {
    if (find_p(i) == i) {
      dfs(i);
    }
  }
  for (int i = 1; i <= n; i++) {
    update(1, 1, t, tin[i], arr[i]);
  }
  for (int i = 1; i <= q; i++) {
    int op = que[i].first;
    if (op == 1) {
      int v = que[i].second;
      int x = query(1, 1, t, tin[v], tout[v]);
      printf("%d\n", x);
      if (x != 0) update(1, 1, t, tin[M[x]], 0);
    }
  }
}
