#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int inf = 0x3f3f3f3f;
const int maxn = 5e5 + 5;
const int mod = 1e9 + 7;
int n, m, q;
int p[maxn];
int u[maxn], v[maxn], del[maxn];
int op[maxn], A[maxn];
int fa[maxn], del_time[maxn], tar_del[maxn];
int pos[maxn];
set<int> st[maxn];
namespace fastIO {
bool IOerror = 0;
inline char nc() {
  static char buf[1000000], *p1 = buf + 1000000, *pend = buf + 1000000;
  if (p1 == pend) {
    p1 = buf;
    pend = buf + fread(buf, 1, 1000000, stdin);
    if (pend == p1) {
      IOerror = 1;
      return -1;
    }
  }
  return *p1++;
}
inline bool blank(char ch) {
  return ch == ' ' || ch == '\n' || ch == '\r' || ch == '\t';
}
inline void read(int &x) {
  char ch;
  while (blank(ch = nc()))
    ;
  if (IOerror) return;
  for (x = ch - '0'; (ch = nc()) >= '0' && ch <= '9'; x = x * 10 + ch - '0')
    ;
}
inline void readll(long long int &x) {
  char ch;
  while (blank(ch = nc()))
    ;
  if (IOerror) return;
  for (x = ch - '0'; (ch = nc()) >= '0' && ch <= '9'; x = x * 10 + ch - '0')
    ;
}
};  // namespace fastIO
using namespace fastIO;
int Find(int x, int now) {
  while (fa[x] != x && now < del_time[x]) x = fa[x];
  return x;
}
void DelGoUp(int x, vector<int> ve) {
  while (true) {
    if (!st[x].count(ve[0])) return;
    for (auto val : ve) st[x].erase(val);
    if (fa[x] == x) return;
    x = fa[x];
  }
}
void Merge(int x, int y, int t) {
  x = Find(x, 0);
  y = Find(y, 0);
  if (x == y) return;
  if ((int)st[x].size() > (int)st[y].size()) swap(x, y);
  fa[x] = y;
  del_time[x] = t;
  tar_del[t] = x;
  for (auto val : st[x]) st[y].insert(val);
}
int main() {
  ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  read(n);
  read(m);
  read(q);
  for (int i = 1; i <= n; i++) {
    read(p[i]);
    pos[p[i]] = i;
  }
  for (int i = 1; i <= m; i++) {
    read(u[i]);
    read(v[i]);
  }
  for (int i = 1; i <= q; i++) {
    read(op[i]);
    read(A[i]);
    if (op[i] == 2) del[A[i]] = true;
  }
  for (int i = 1; i <= n; i++) {
    fa[i] = i;
    del_time[i] = q + 1;
    st[i].insert(p[i]);
  }
  for (int i = 1; i <= m; i++) {
    if (!del[i]) Merge(u[i], v[i], q + 1);
  }
  for (int i = q; i >= 1; i--) {
    if (op[i] == 2) Merge(u[A[i]], v[A[i]], i);
  }
  for (int i = 1; i <= q; i++) {
    if (op[i] == 1) {
      int x = Find(A[i], i);
      if (st[x].empty())
        cout << 0 << "\n";
      else {
        int val = *st[x].rbegin();
        cout << val << "\n";
        DelGoUp(pos[val], {val});
      }
    } else {
      int x = tar_del[i];
      if (x == 0 || fa[x] == x || st[x].empty()) continue;
      vector<int> ve((int)st[x].size());
      int ii = 0;
      for (auto val : st[x]) ve[ii++] = val;
      DelGoUp(fa[x], ve);
    }
  }
  return 0;
}
