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;
const int N = 2e5 + 10, M = 3e5 + 10;
int n, m, q;
int w[N], h[N], e[M], ne[M], idx;
int p[N], edges[M];
void add(int x, int y, int pos) {
  e[++idx] = y;
  ne[idx] = h[x];
  h[x] = idx;
  edges[pos] = idx;
}
int find(int x) {
  if (p[x] != x) p[x] = find(p[x]);
  return p[x];
}
void setup() {
  for (int i = 1; i <= n; i++) p[i] = i;
  for (int i = 1; i <= n; i++) {
    for (int j = h[i]; j; j = ne[j]) {
      if (!e[j]) continue;
      int y = e[j];
      int pi = find(i);
      p[y] = pi;
    }
  }
}
void q1(int v) {
  int pv = find(v);
  int res = w[v], pos = v;
  for (int i = 1; i <= n; i++) {
    if (pv == find(i) && res < w[i]) {
      res = w[i];
      pos = i;
    }
  }
  w[pos] = 0;
  cout << res << endl;
}
void q2(int i) {
  e[edges[i]] = 0;
  setup();
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m >> q;
  for (int i = 1; i <= n; i++) cin >> w[i];
  for (int i = 1; i <= m; i++) {
    int x, y;
    cin >> x >> y;
    add(x, y, i);
  }
  setup();
  while (q--) {
    int q, arg;
    cin >> q >> arg;
    if (q == 1)
      q1(arg);
    else
      q2(arg);
  }
  return 0;
}
