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 = (int)5e5 + 123, mod = (int)1e9 + 7, inf = (int)1e9, bl = 2000;
const long long INF = (long long)1e18;
struct query {
  int t, i;
} q[N];
int n, m, Q, a[N], p[N], sz[N], pa[N], sza[N], del[N], xa[N], ya[N], used[N],
    ustim, curtim, ans, ansnum;
pair<int, int> b[N];
vector<pair<int, int> > g[N];
vector<int> c[N];
int get(int x) {
  if (x == p[x]) return x;
  return p[x] = get(p[x]);
}
void merge(int x, int y) {
  x = get(x);
  y = get(y);
  if (x == y) return;
  if (sz[x] < sz[y]) swap(x, y);
  p[y] = x;
  sz[x] += sz[y];
}
void dfs(int v) {
  used[v] = ustim;
  if (c[v].size() > 0 && c[v].back() > ans) ansnum = v, ans = c[v].back();
  for (int i = 0; i < (int)g[v].size(); ++i) {
    if (g[v][i].second <= curtim || used[g[v][i].first] == ustim) continue;
    dfs(g[v][i].first);
  }
}
int main() {
  cin.tie(0);
  cout.tie(0);
  ios_base::sync_with_stdio(NULL);
  cin >> n >> m >> Q;
  for (int i = 1; i <= n; ++i) cin >> a[i], b[i].first = a[i], b[i].second = i;
  sort(b + 1, b + n + 1);
  for (int i = 1; i <= m; ++i) cin >> xa[i] >> ya[i];
  for (int i = 1; i <= Q; ++i) {
    cin >> q[i].t >> q[i].i;
    if (q[i].t == 2) del[q[i].i] = 1;
  }
  for (int i = 1; i <= n; ++i) p[i] = i, sz[i] = 1;
  for (int i = 1; i <= m; ++i)
    if (!del[i]) {
      merge(xa[i], ya[i]);
    }
  for (int i = 1; i <= n; ++i) pa[i] = get(i), sza[i] = sz[i];
  for (int l = Q; l <= Q;) {
    int r = l, cnt = (q[l].t == 2);
    while (r < Q && cnt <= bl) {
      r++;
      cnt += (q[r].t == 2);
    }
    for (int i = 1; i <= n; ++i) p[i] = pa[i], sz[i] = sza[i];
    for (int i = Q; i > r; --i)
      if (q[i].t == 2) merge(xa[q[i].i], ya[q[i].i]);
    for (int i = 1; i <= n; ++i) p[i] = get(p[i]);
    for (int i = l; i <= r; ++i)
      if (q[i].t == 2)
        g[p[xa[q[i].i]]].push_back(make_pair(p[ya[q[i].i]], i)),
            g[p[ya[q[i].i]]].push_back(make_pair(p[xa[q[i].i]], i));
    for (int i = 1; i <= n; ++i) {
      c[p[b[i].second]].push_back(a[b[i].second]);
    }
    for (int i = l; i <= r; ++i)
      if (q[i].t == 1) {
        ustim++;
        curtim = i;
        ansnum = 0, ans = 0;
        dfs(p[q[i].i]);
        cout << ans << endl;
        if (ansnum > 0) c[ansnum].pop_back();
      }
    for (int i = 1; i <= n; ++i) c[i].clear(), g[i].clear();
    l = r + 1;
  }
  return 0;
}
