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;
template <class T>
using V = vector<T>;
template <class T, size_t SZ>
using AR = array<T, SZ>;
template <class T>
bool ckmin(T& a, const T& b) {
  return b < a ? a = b, 1 : 0;
}
template <class T>
bool ckmax(T& a, const T& b) {
  return a < b ? a = b, 1 : 0;
}
constexpr int pct(int x) { return __builtin_popcount(x); }
constexpr int bits(int x) { return 31 - __builtin_clz(x); }
long long cdiv(long long a, long long b) {
  return a / b + ((a ^ b) > 0 && a % b);
}
long long fdiv(long long a, long long b) {
  return a / b - ((a ^ b) < 0 && a % b);
}
long long half(long long x) { return fdiv(x, 2); }
template <class T, class U>
T fstTrue(T lo, T hi, U first) {
  hi++;
  assert(lo <= hi);
  while (lo < hi) {
    T mid = half(lo + hi);
    first(mid) ? hi = mid : lo = mid + 1;
  }
  return lo;
}
template <class T, class U>
T lstTrue(T lo, T hi, U first) {
  lo--;
  assert(lo <= hi);
  while (lo < hi) {
    T mid = half(lo + hi + 1);
    first(mid) ? lo = mid : hi = mid - 1;
  }
  return lo;
}
template <class T>
void remDup(vector<T>& v) {
  sort(begin(v), end(v));
  v.erase(unique(begin(v), end(v)), end(v));
}
template <class A>
void re(complex<A>& c);
template <class A, class B>
void re(pair<A, B>& p);
template <class A>
void re(vector<A>& v);
template <class A, size_t SZ>
void re(array<A, SZ>& a);
template <class T>
void re(T& x) {
  cin >> x;
}
void re(double& d) {
  string t;
  re(t);
  d = stod(t);
}
void re(long double& d) {
  string t;
  re(t);
  d = stold(t);
}
template <class H, class... T>
void re(H& h, T&... t) {
  re(h);
  re(t...);
}
template <class A>
void re(complex<A>& c) {
  A a, b;
  re(a, b);
  c = {a, b};
}
template <class A, class B>
void re(pair<A, B>& p) {
  re(p.first, p.second);
}
template <class A>
void re(vector<A>& x) {
  for (auto& a : x) re(a);
}
template <class A, size_t SZ>
void re(array<A, SZ>& x) {
  for (auto& a : x) re(a);
}
string to_string(char c) { return string(1, c); }
string to_string(const char* second) { return (string)second; }
string to_string(string second) { return second; }
string to_string(bool b) { return to_string((int)b); }
template <class A>
string to_string(complex<A> c) {
  stringstream ss;
  ss << c;
  return ss.string();
}
string to_string(vector<bool> v) {
  string res = "{";
  for (int i = (0); i < ((int)(v).size()); ++i) res += char('0' + v[i]);
  res += "}";
  return res;
}
template <size_t SZ>
string to_string(bitset<SZ> b) {
  string res = "";
  for (int i = (0); i < (SZ); ++i) res += char('0' + b[i]);
  return res;
}
template <class A, class B>
string to_string(pair<A, B> p);
template <class T>
string to_string(T v) {
  bool fst = 1;
  string res = "";
  for (const auto& x : v) {
    if (!fst) res += " ";
    fst = 0;
    res += to_string(x);
  }
  return res;
}
template <class A, class B>
string to_string(pair<A, B> p) {
  return to_string(p.first) + " " + to_string(p.second);
}
template <class A>
void pr(A x) {
  cout << to_string(x);
}
template <class H, class... T>
void pr(const H& h, const T&... t) {
  pr(h);
  pr(t...);
}
void ps() { pr("\n"); }
template <class H, class... T>
void ps(const H& h, const T&... t) {
  pr(h);
  if (sizeof...(t)) pr(" ");
  ps(t...);
}
void DBG() { cerr << "]" << endl; }
template <class H, class... T>
void DBG(H h, T... t) {
  cerr << to_string(h);
  if (sizeof...(t)) cerr << ", ";
  DBG(t...);
}
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int max(int a, int b, int c) { return max(a, max(b, c)); }
int min(int a, int b, int c) { return min(a, min(b, c)); }
long long max(long long a, long long b, long long c) {
  return max(a, max(b, c));
}
long long min(long long a, long long b, long long c) {
  return min(a, min(b, c));
}
void dbga(int arr[], int n) {
  vector<int> v;
  for (int i = (0); i < (n); ++i) v.push_back(arr[i]);
  0;
}
void dbga(long long arr[], int n) {
  vector<int> v;
  for (int i = (0); i < (n); ++i) v.push_back(arr[i]);
  0;
}
void setIn(string second) { freopen(second.c_str(), "r", stdin); }
void setOut(string second) { freopen(second.c_str(), "w", stdout); }
void unsyncIO() { cin.tie(0)->sync_with_stdio(0); }
void setIO(string second = "") {
  unsyncIO();
  if ((int)(second).size()) {
    setIn(second + ".in"), setOut(second + ".out");
  }
}
const int MOD = 1e9 + 7;
const int MX = 3e5 + 5;
const long long INF = 1e18;
const long double PI = acos((long double)-1);
const int xd[4] = {1, 0, -1, 0}, yd[4] = {0, 1, 0, -1};
mt19937 rng((uint32_t)chrono::steady_clock::now().time_since_epoch().count());
template <class T>
struct Seg {
  int n;
  vector<T> seg;
  const T ID = {0, 0};
  T comb(T a, T b) { return max(a, b); }
  void init(int _n) {
    n = _n;
    seg.assign(2 * n, ID);
  }
  void pull(int p) { seg[p] = comb(seg[2 * p], seg[2 * p + 1]); }
  void upd(int p, T val) {
    seg[p += n] = val;
    for (p /= 2; p; p /= 2) pull(p);
  }
  T query(int l, int r) {
    T ra = ID, rb = ID;
    for (l += n, r += n + 1; l < r; l /= 2, r /= 2) {
      if (l & 1) ra = comb(ra, seg[l++]);
      if (r & 1) rb = comb(seg[--r], rb);
    }
    return comb(ra, rb);
  }
};
const int MX2 = 5e5;
int l[MX2];
struct DSU {
  vector<int> e, in[MX];
  void init(int N) {
    e = vector<int>(N, -1);
    for (int i = (0); i < (N); ++i) in[i].push_back(i);
  }
  int get(int x) { return e[x] < 0 ? x : e[x] = get(e[x]); }
  bool sameSet(int a, int b) { return get(a) == get(b); }
  int size(int x) { return -e[get(x)]; }
  bool unite(int x, int y, int z) {
    x = get(x), y = get(y);
    if (x == y) return 0;
    if (e[x] > e[y]) swap(x, y);
    e[x] += e[y];
    e[y] = x;
    if (z != -1) l[z] = (int)(in[x]).size();
    for (auto& a : in[y]) in[x].push_back(a);
    return 1;
  }
};
int n, m, Q, k, a[MX];
string S;
bool w = true;
Seg<pair<int, int> > seg;
DSU dsu;
map<int, int> M;
set<int> adj[MX];
set<pair<int, int> > segs;
bool imp[MX2];
pair<int, int> q[MX], e[MX];
void solve() {
  re(n, m, Q);
  seg.init(n + 5);
  dsu.init(n + 5);
  for (int i = (1); i < (n + 1); ++i) re(a[i]);
  for (int i = (1); i < (m + 1); ++i) {
    int u, v;
    re(u, v);
    e[i] = {u, v};
    adj[u].insert(v);
    adj[v].insert(u);
  }
  for (int i = (0); i < (Q); ++i) {
    int t, x;
    re(t, x);
    q[i] = {t, x};
    if (t == 2) {
      pair<int, int> y = e[x];
      adj[y.first].erase(y.second);
      adj[y.second].erase(y.first);
    }
  }
  for (int i = (1); i < (n + 1); ++i)
    for (auto& x : adj[i]) dsu.unite(i, x, -1);
  for (int i = (Q)-1; i >= (0); --i)
    if (q[i].first == 2) {
      pair<int, int> y = e[q[i].second];
      imp[i] = dsu.unite(y.first, y.second, i);
    }
  int cnt = 0;
  for (int i = (1); i < (n + 1); ++i)
    if (dsu.get(i) == i) {
      vector<int> v = dsu.in[i];
      int bef = cnt;
      for (auto& x : v) {
        seg.upd(cnt, {a[x], cnt});
        M[x] = cnt++;
      }
      segs.insert({bef, cnt - 1});
    }
  for (int i = (0); i < (Q); ++i) {
    pair<int, int> y = q[i];
    y.second = M[y.second];
    if (y.first == 1) {
      auto it = segs.lower_bound(make_pair(y.second, MOD));
      it--;
      pair<int, int> tmp = *it;
      pair<int, int> ans = seg.query(tmp.first, tmp.second);
      if (ans.first) seg.upd(ans.second, {0, 0});
      ps(ans.first);
    } else {
      if (imp[i]) {
        auto it = segs.lower_bound(make_pair(y.second, MOD));
        it--;
        pair<int, int> tmp = *it;
        segs.erase(it);
        assert(l[i]);
        pair<int, int> a = {tmp.first, tmp.first + l[i] - 1},
                       b = {tmp.first + l[i], tmp.second};
        segs.insert(a);
        segs.insert(b);
      }
    }
  }
}
int main() {
  setIO();
  int t = 1;
  while (t--) solve();
}
