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;
inline long long getint() {
  char c = getchar();
  long long ret = 0, f = 1;
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') ret = ret * 10 + c - '0', c = getchar();
  return ret * f;
}
const int maxn = 3e5 + 10;
struct edge {
  int to, id;
  edge(int _to = 0, int _id = 0) {
    to = _to;
    id = _id;
  }
};
vector<edge> E[maxn];
int n, m, q, a[maxn];
int cur[maxn], dp[maxn], de[maxn];
inline int cmp(edge x, edge y) { return a[x.to] > a[y.to]; }
int main() {
  n = getint();
  m = getint();
  q = getint();
  for (int i = 1; i <= n; i++) a[i] = getint();
  for (int i = 1; i <= m; i++) {
    int u = getint(), v = getint();
    E[u].push_back(edge(v, i));
    E[v].push_back(edge(u, i));
  }
  for (int i = 1; i <= n; i++) sort(E[i].begin(), E[i].end(), cmp);
  while (q--) {
    int opt = getint(), u = getint();
    if (opt == 1) {
      int flag = 0;
      for (int &i = cur[u]; i < E[u].size(); i++) {
        if (de[E[u][i].id]) continue;
        if (dp[E[u][i].to]) continue;
        if (!dp[u] && a[E[u][i].to] < a[u]) break;
        dp[E[u][i].to] = 1;
        flag = a[E[u][i].to];
        break;
      }
      if (!flag && !dp[u]) dp[u] = 1, flag = a[u];
      printf("%d\n", flag);
    } else
      de[u] = 1;
  }
  return 0;
}
