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 long long MOD = (long long)1e9 + 7;
const int SIZE = 2e5 + 5;
const long long INF = 1e9;
const double eps = 1e-4;
const double PI = 3.1415926535897932;
int a[200009];
pair<int, int> q[500009];
pair<int, int> e[300009];
int et[300009];
pair<int, int> p[300009];
int ss[300009];
int fp(int x, int t) {
  if (p[x].first == x) return x;
  return fp(p[x].first, t);
}
void mg(int x, int y, int t) {
  int xp = fp(x, INF), yp = fp(y, INF);
  if (xp == yp) return;
  if (ss[yp] > ss[xp]) swap(xp, yp);
  p[yp] = {xp, t};
  ss[xp] += ss[yp];
}
set<pair<int, int> > ns[200009];
int main() {
  int n, m, qn;
  scanf("%d%d%d", &n, &m, &qn);
  for (int i = 0; i < (n); ++i) {
    scanf("%d", &(a[i]));
    p[i] = make_pair(i, qn);
  }
  for (int i = 0; i < (m); ++i) {
    scanf("%d%d", &(e[i].first), &(e[i].second));
    e[i].first--;
    e[i].second--;
    et[i] = qn;
  }
  for (int i = 0; i < (qn); ++i) {
    scanf("%d%d", &(q[i].first), &(q[i].second));
    q[i].second--;
  }
  for (int qi = qn - 1; qi >= 0; qi--) {
    if (q[qi].first == 2) {
      et[q[qi].second] = qi;
    }
  }
  vector<pair<int, int> > el;
  for (int i = 0; i < (m); ++i) {
    el.push_back({et[i], {i}});
  }
  sort((el).begin(), (el).end(), greater<pair<int, int> >());
  for (pair<int, int> ee : el) {
    int t = ee.first, x = e[ee.second].first, y = e[ee.second].second;
    mg(x, y, t);
  }
  for (int i = 0; i < (n); ++i) {
    int x = i;
    while (1) {
      ns[x].insert({a[i], i});
      if (p[x].first == x) break;
      x = p[x].first;
    }
  }
  for (int qi = 0; qi < (qn); ++qi) {
    if (q[qi].first == 1) {
      int x = q[qi].second;
      pair<int, int> maxv = {0, 0};
      while (1) {
        if (((int)(ns[x]).size())) maxv = max(maxv, *ns[x].rbegin());
        if (p[x].second < qi || p[x].first == x) break;
        x = p[x].first;
      }
      printf("%d\n", maxv.first);
      if (maxv.first == 0) continue;
      x = maxv.second;
      while (1) {
        ns[x].erase(maxv);
        if (p[x].second < qi || p[x].first == x) break;
        x = p[x].first;
      }
    } else {
      int x = e[q[qi].second].first, y = e[q[qi].second].second;
      if (p[x].first == y) swap(x, y);
      if (p[y].first == x) {
        for (auto vv : ns[y]) {
          ns[x].erase(vv);
        }
      }
    }
  }
}
