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;
long double PI = 3.14159265359;
long double DEL = 1e-10;
int mod = 1000000007;
long long fpow(long long x, long long n) {
  long long res = 1;
  while (n) {
    if (n & 1) res = res * x % mod;
    x = x * x % mod;
    n >>= 1;
  }
  return res;
}
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
void sieve(long long n) {
  bool prime[1000006];
  memset(prime, true, sizeof(prime));
  long long rootn = (long long)sqrt(n);
  for (long long p = 2; p <= rootn; p++)
    if (prime[p] == true)
      for (long long i = p * p; i <= n; i += p) prime[i] = false;
  prime[1] = 0;
}
const long long N = 400050;
long long cnt, sum, mid, mx, mn, ans, a[N], b[N];
long long n, m, d, i, j, k, l, p, que, r, w, x[N], y[N], del[N];
bool f, f1, f2;
string s;
pair<long long, long long> t[N * 4], q[2 * N];
long long check[N], timer = 1, tin[N], tout[N];
vector<long long> g[N];
long long find(long long i) {
  if (i == a[i]) {
    return i;
  }
  return a[i] = find(a[i]);
}
void join(long long x, long long y) {
  long long parx = find(x), pary = find(y);
  if (parx == pary) {
    return;
  }
  n++;
  a[parx] = n;
  a[pary] = n;
  a[n] = n;
  g[n].push_back(parx);
  g[n].push_back(pary);
}
void dfs(long long i, long long par) {
  tin[i] = timer++;
  for (auto j : g[i]) {
    if (j != par) {
      dfs(j, i);
    }
  }
  tout[i] = timer;
}
void update(long long i, long long l, long long r, long long x,
            pair<long long, long long> v) {
  if (x < l || x > r) {
    return;
  }
  if (l == r) {
    t[i] = v;
    return;
  }
  long long y = 2 * i;
  update(y, l, (l + r) / 2, x, v);
  update(y | 1, (l + r + 2) / 2, r, x, v);
  t[i] = max(t[y], t[y | 1]);
}
pair<long long, long long> query(long long i, long long l, long long r,
                                 long long a, long long b) {
  if (a <= l and r <= b) {
    return t[i];
  }
  if (a > r || b < l) {
    return {0, 0};
  }
  long long y = 2 * i;
  return max(query(y, l, (l + r) / 2, a, b),
             query(y | 1, (l + r + 2) / 2, r, a, b));
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m >> que;
  for (long long i = 1; i <= n; i++) {
    cin >> b[i];
    a[i] = i;
  }
  for (long long i = 1; i <= m; i++) {
    cin >> x[i] >> y[i];
  }
  for (long long i = 1; i <= que; i++) {
    cin >> q[i].first >> q[i].second;
    if (q[i].first == 2) {
      del[q[i].second] = 1;
    }
  }
  for (long long i = 1; i <= m; i++) {
    if (!del[i]) {
      join(x[i], y[i]);
    }
  }
  for (long long i = que; i > 0; i--) {
    if (q[i].first == 1) {
      check[i] = find(q[i].second);
    } else {
      join(x[q[i].second], y[q[i].second]);
    }
  }
  for (long long i = 1; i <= n; i++) {
    if (a[i] == i) {
      dfs(i, i);
    }
  }
  for (long long i = 1; i <= n; i++) {
    update(1, 1, timer, tin[i], {b[i], tin[i]});
  }
  for (long long i = 1; i <= que; i++) {
    if (q[i].first == 1) {
      k = check[i];
      auto j = query(1, 1, timer, tin[k], tout[k]);
      update(1, 1, timer, j.second, {0, j.second});
      cout << j.first;
      cout << "\n";
    }
  }
}
