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 = N + 3e5 + 10;
int n, m, q, p[N];
struct node {
  int x, y, id;
} e[M << 1];
vector<int> a[N];
int hd[N];
bool bk[M];
bool cmp(node p1, node p2) { return p[p1.y] > p[p2.y]; }
int main() {
  cin >> n >> m >> q;
  for (int i = 1; i <= n; i++) scanf("%d", &p[i]);
  for (int i = 1; i <= m; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    e[2 * i - 1] = (node){x, y, 2 * i - 1};
    e[2 * i] = (node){y, x, 2 * i};
  }
  for (int i = 1; i <= n; i++) {
    e[2 * m + i] = (node){i, i, 2 * m + i};
  }
  sort(e + 1, e + 2 * m + n + 1, cmp);
  for (int i = 1; i <= 2 * m + n; i++) a[e[i].x].push_back(i);
  int op, x;
  while (q--) {
    scanf("%d%d", &op, &x);
    if (op == 1) {
      int pos = -1;
      for (int &i = hd[x]; i < a[x].size(); i++) {
        int y = e[a[x][i]].y, id = e[a[x][i]].id;
        if (!p[y] || bk[id]) continue;
        pos = i;
        printf("%d\n", p[y]);
        p[y] = 0;
        break;
      }
      if (pos == -1) puts("0");
    } else
      bk[2 * x - 1] = bk[2 * x] = 1;
  }
  return 0;
}
