#include <bits/stdc++.h>
using namespace std;
int n, m, q, idx, N;
bool rem[4000005];
int p[4000005], a[4000005], par[4000005], st[4000005], en[4000005],
    tree[4000005];
pair<int, int> que[4000005], edg[4000005];
vector<int> ch[4000005];
int query(int root, int nl, int nh, int ql, int qh) {
  if (ql > nh || qh < nl) return 0;
  if (nl >= ql && nh <= qh) return tree[root];
  int mid = (nl + nh) / 2;
  int a = query(root * 2, nl, mid, ql, qh);
  int b = query(root * 2 + 1, mid + 1, nh, ql, qh);
  if (p[a] > p[b]) return a;
  return b;
}
void upd(int root, int nl, int nh, int pos, int val) {
  if (pos >= nl && pos <= nh) {
    if (nl == nh) {
      tree[root] = a[nl];
      p[a[nl]] = val;
    } else {
      int mid = (nl + nh) / 2;
      upd(root * 2, nl, mid, pos, val);
      upd(root * 2 + 1, mid + 1, nh, pos, val);
      int i = tree[root * 2], j = tree[root * 2 + 1];
      if (p[i] > p[j])
        tree[root] = i;
      else
        tree[root] = j;
    }
  }
}
int find(int x) {
  if (par[x] == x) return x;
  return par[x] = find(par[x]);
}
void uni(int u, int v) {
  if (find(u) == find(v)) return;
  u = find(u);
  v = find(v);
  n++;
  par[u] = n;
  par[v] = n;
  par[n] = n;
  ch[n].push_back(u);
  ch[n].push_back(v);
}
void dfs(int u) {
  a[++idx] = u;
  st[u] = idx;
  for (int v : ch[u]) dfs(v);
  en[u] = idx;
}
void printTree(int root, int low, int high) {
  cout << "[" << low << ":" << high << "] " << tree[root] << " "
       << p[tree[root]] << endl;
  if (low < high) {
    int mid = (low + high) / 2;
    printTree(root * 2, low, mid);
    printTree(root * 2 + 1, mid + 1, high);
  }
}
int main() {
  scanf("%d %d %d", &n, &m, &q);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &p[i]);
    par[i] = i;
  }
  for (int i = 1; i <= m; i++) scanf("%d %d", &edg[i].first, &edg[i].second);
  for (int i = 1; i <= q; i++) {
    scanf("%d %d", &que[i].first, &que[i].second);
    if (que[i].first == 2) rem[que[i].second] = true;
  }
  for (int i = 1; i <= m; i++) {
    if (!rem[i]) {
      int u = edg[i].first, v = edg[i].second;
      uni(u, v);
    }
  }
  for (int i = q; i > 0; i--) {
    if (que[i].first == 1)
      que[i].second = find(que[i].second);
    else {
      int u = edg[que[i].second].first, v = edg[que[i].second].second;
      uni(u, v);
    }
  }
  for (int i = 1; i <= n; i++)
    if (par[i] == i) dfs(i);
  for (int i = 1; i <= n; i++) upd(1, 1, n, i, p[a[i]]);
  for (int i = 1; i <= q; i++) {
    if (que[i].first == 1) {
      int v = que[i].second;
      int pos = query(1, 1, n, st[v], en[v]);
      printf("%d\n", p[pos]);
      upd(1, 1, n, st[pos], 0);
    }
  }
  return 0;
}
