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;
struct treap {
  treap *l, *r, *f;
  pair<int, int> Max;
  int val;
  int id;
  int pri;
  treap(int first, int _id)
      : l(NULL),
        r(NULL),
        f(NULL),
        id(_id),
        val(first),
        pri((rand() * (1ll << 20) + rand()) % 1000000000) {
    Max = make_pair(val, id);
  }
} * node[200005];
pair<int, int> Max(treap *t) { return t ? t->Max : make_pair(0, 0); }
void pull(treap *t) {
  t->Max = max(max(Max(t->l), Max(t->r)), make_pair(t->val, t->id));
}
treap *merge(treap *l, treap *r) {
  if (!l || !r) return l ? l : r;
  if (l->pri < r->pri) {
    l->r = merge(l->r, r);
    l->r->f = l;
    pull(l);
    return l;
  } else {
    r->l = merge(l, r->l);
    r->l->f = r;
    pull(r);
    return r;
  }
}
void split(treap *t, int k, treap *&l, treap *&r) {
  if (!t)
    l = r = NULL;
  else if (t->id < k) {
    l = t;
    split(t->r, k, l->r, r);
    if (r) r->f = NULL;
    if (l->r) l->r->f = l;
    pull(l);
  } else {
    r = t;
    split(t->l, k, l, r->l);
    if (l) l->f = NULL;
    if (r->l) r->l->f = r;
    pull(r);
  }
}
treap *getf(treap *t) {
  while (t->f) t = t->f;
  return t;
}
pair<int, int> e[300005];
int ok[300005];
int f[200005];
vector<int> v[200005];
int Find(int first) {
  if (f[first] == first) return first;
  return f[first] = Find(f[first]);
}
int in[200005], out[200005];
int t;
int p[200005];
void dfs(int first, int f) {
  in[first] = ++t;
  node[t] = new treap(p[first], t);
  for (auto it : v[first]) {
    if (it != f) {
      dfs(it, first);
    }
  }
  out[first] = t;
}
void solve() {
  srand(time(NULL));
  int n, m, q;
  scanf("%d %d %d", &n, &m, &q);
  for (int i = 1; i <= n; i++) scanf("%d", &p[i]), f[i] = i;
  for (int i = 1; i <= m; i++) {
    int first, second;
    scanf("%d %d", &first, &second);
    e[i] = make_pair(first, second);
  }
  fill(ok, ok + m + 1, 1);
  vector<pair<int, int> > qu;
  for (int i = 1; i <= q; i++) {
    int op, first;
    scanf("%d %d", &op, &first);
    qu.push_back(make_pair(op, first));
    if (op == 2) ok[first] = 0;
  }
  for (int i = 1; i <= m; i++) {
    if (ok[i]) {
      int first, second;
      tie(first, second) = e[i];
      first = Find(first);
      second = Find(second);
      if (first != second) {
        v[e[i].first].push_back(e[i].second);
        v[e[i].second].push_back(e[i].first);
        f[first] = second;
      }
    }
  }
  for (int i = q - 1; i >= 0; i--) {
    if (qu[i].first == 2) {
      int first, second;
      tie(first, second) = e[qu[i].second];
      int fx = Find(first), fy = Find(second);
      if (fx != fy) {
        ok[qu[i].second] = 1;
        v[first].push_back(second);
        v[second].push_back(first);
        f[fx] = fy;
      }
    }
  }
  int lastnum = 0;
  for (int i = 1; i <= n; i++) {
    if (in[i] == 0) {
      dfs(i, 0);
      treap *last = node[lastnum + 1];
      for (int j = lastnum + 2; j <= t; j++) {
        last = merge(last, node[j]);
      }
      lastnum = t;
    }
  }
  for (int i = 0; i < q; i++) {
    if (qu[i].first == 2 && ok[qu[i].second]) {
      int first, second;
      tie(first, second) = e[qu[i].second];
      if (in[first] < in[second]) swap(first, second);
      treap *t = getf(node[in[second]]);
      treap *l, *mid, *r;
      split(t, in[first], l, mid);
      split(mid, out[first] + 1, mid, r);
      if (l) l->f = NULL;
      mid->f = NULL;
      if (r) r->f = NULL;
      t = merge(l, r);
    }
    if (qu[i].first == 1) {
      int v = qu[i].second;
      treap *t = getf(node[in[v]]);
      printf("%d\n", t->Max.first);
      if (t->Max.first) {
        int re = t->Max.second;
        treap *l, *mid, *r;
        split(t, re, l, mid);
        split(mid, re + 1, mid, r);
        mid->val = 0;
        mid->Max = make_pair(0, mid->id);
        if (l) l->f = NULL;
        if (r) r->f = NULL;
        mid->f = NULL;
        t = merge(l, merge(mid, r));
      }
    }
  }
}
int main() {
  int t = 1;
  while (t--) {
    solve();
  }
}
