9 5 14
7 1 4 8 5 2 6 9 3
2 8
1 6
5 7
1 3
3 9
1 5
1 8
1 5
1 4
1 8
1 3
1 5
1 5
1 7
1 7
2 3
1 2
1 1
1 2
 6 5 8
1 2 6 3 4 5
2 4
1 3
1 6
3 5
2 5
1 1
1 4
1 1
2 1
2 5
2 2
2 3
1 4
 2 1 3
1 2
1 2
1 1
1 1
1 1

6
9
5
8
1
7
0
0
0
0
0
4
0
 6
5
4
3
 2
1
0

#include <bits/stdc++.h>
using namespace std;
template <typename T>
void out(T x) {
  cout << x << endl;
  exit(0);
}
using ll = long long;
const int maxn = 1e6 + 5;
int n, m, q;
int p[maxn];
pair<int, int> E[maxn];
pair<int, int> Q[maxn];
bool deleted[maxn];
int par[maxn];
int parent(int x) {
  if (par[x] == x) return x;
  return par[x] = parent(par[x]);
}
vector<int> g[maxn];
void join(int u, int v) {
  u = parent(u);
  v = parent(v);
  if (u == v) return;
  ++n;
  par[n] = n;
  par[u] = n;
  par[v] = n;
  g[n].push_back(u);
  g[n].push_back(v);
}
int tin[maxn], tout[maxn];
int timer = 0;
void dfs(int at) {
  tin[at] = ++timer;
  for (int to : g[at]) {
    dfs(to);
  }
  tout[at] = timer;
}
pair<int, int> t[4 * maxn];
void upd(int v, int tl, int tr, int i, pair<int, int> val) {
  if (tl == tr) {
    t[v] = val;
  } else {
    int tm = (tl + tr) / 2;
    if (i <= tm) {
      upd(2 * v, tl, tm, i, val);
    } else {
      upd(2 * v + 1, tm + 1, tr, i, val);
    }
    t[v] = max(t[2 * v], t[2 * v + 1]);
  }
}
pair<int, int> qry(int v, int tl, int tr, int l, int r) {
  if (l > tr || r < tl) {
    return {0, 0};
  }
  if (l <= tl && tr <= r) {
    return t[v];
  }
  int tm = (tl + tr) / 2;
  return max(qry(2 * v, tl, tm, l, r), qry(2 * v + 1, tm + 1, tr, l, r));
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m >> q;
  for (int i = 1; i <= n; i++) {
    cin >> p[i];
  }
  for (int i = 1; i <= m; i++) {
    cin >> E[i].first >> E[i].second;
  }
  for (int i = 1; i <= q; i++) {
    cin >> Q[i].first >> Q[i].second;
    if (Q[i].first == 2) {
      deleted[Q[i].second] = true;
    }
  }
  for (int i = 1; i <= n; i++) {
    par[i] = i;
  }
  for (int i = 1; i <= m; i++) {
    if (!deleted[i]) {
      join(E[i].first, E[i].second);
    }
  }
  for (int i = q; i >= 1; i--) {
    int type = Q[i].first;
    if (type == 2) {
      int id = Q[i].second;
      join(E[id].first, E[id].second);
    } else {
      Q[i].second = parent(Q[i].second);
    }
  }
  for (int i = 1; i <= n; i++) {
    if (parent(i) == i) {
      dfs(i);
    }
  }
  for (int i = 1; i <= n; i++) {
    upd(1, 1, n, tin[i], make_pair(p[i], tin[i]));
  }
  for (int i = 1; i <= q; i++) {
    int type = Q[i].first;
    if (type == 1) {
      int curP = Q[i].second;
      pair<int, int> res = qry(1, 1, n, tin[curP], tout[curP]);
      cout << res.first << "\n";
      if (res.first == 0) {
        continue;
      }
      int loc = res.second;
      upd(1, 1, n, loc, {0, 0});
    }
  }
  return 0;
}
