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 <typename T>
void read(T &x) {
  x = 0;
  char ch = getchar();
  long long f = 1;
  while (!isdigit(ch)) {
    if (ch == '-') f *= -1;
    ch = getchar();
  }
  while (isdigit(ch)) {
    x = x * 10 + ch - 48;
    ch = getchar();
  }
  x *= f;
}
template <typename T, typename... Args>
void read(T &first, Args &...args) {
  read(first);
  read(args...);
}
template <typename T>
void write(T arg) {
  T x = arg;
  if (x < 0) {
    putchar('-');
    x = -x;
  }
  if (x > 9) {
    write(x / 10);
  }
  putchar(x % 10 + '0');
}
template <typename T, typename... Ts>
void write(T arg, Ts... args) {
  write(arg);
  if (sizeof...(args) != 0) {
    putchar(' ');
    write(args...);
  }
}
using namespace std;
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
const int N = 1e6 + 5;
int n, m, q;
int a[N], fa[N], ntot, val[N];
struct node1 {
  int u, v;
} E[N];
struct node2 {
  int op, x;
} Q[N];
vector<int> edge[N];
int vis[N];
int findroot(int x) {
  if (fa[x] == x) return fa[x];
  return fa[x] = findroot(fa[x]);
}
void merge(int x, int y, int w) {
  int fax = findroot(x);
  int fay = findroot(y);
  if (fax != fay) {
    ++ntot;
    val[ntot] = w;
    edge[ntot].push_back(fax), edge[fax].push_back(ntot);
    edge[ntot].push_back(fay), edge[fay].push_back(ntot);
    fa[fax] = fa[fay] = fa[ntot] = ntot;
  }
}
int dfn[N], times, bz[N][25], siz[N], ver[N];
void dfs(int u, int pa) {
  siz[u] = 1;
  dfn[u] = ++times;
  ver[times] = u;
  for (auto v : edge[u]) {
    if (v != pa) {
      bz[v][0] = u;
      dfs(v, u);
      siz[u] += siz[v];
    }
  }
}
void deal() {
  for (int i = 1; i <= 20; i++)
    for (int j = 1; j <= ntot; j++) bz[j][i] = bz[bz[j][i - 1]][i - 1];
}
pair<int, int> p[N * 4];
void insert(int i, int l, int r, int id, int x) {
  if (l == r) {
    p[i].first = x;
    p[i].second = id;
    return;
  }
  int mid = (l + r) >> 1;
  if (id <= mid)
    insert(i << 1, l, mid, id, x);
  else
    insert(i << 1 | 1, mid + 1, r, id, x);
  p[i] = max(p[i << 1], p[i << 1 | 1]);
  return;
}
pair<int, int> query(int i, int L, int R, int l, int r) {
  pair<int, int> ans;
  ans.first = 0, ans.second = 0;
  if (L >= l && R <= r) return p[i];
  int mid = (L + R) / 2;
  if (l <= mid) ans = max(ans, query(i << 1, L, mid, l, r));
  if (mid < r) ans = max(ans, query(i << 1 | 1, mid + 1, R, l, r));
  return ans;
}
int main() {
  read(n, m, q);
  ntot = n;
  for (int i = 1; i <= n; i++) read(a[i]), fa[i] = i;
  for (int i = 1; i <= m; i++) read(E[i].u, E[i].v);
  for (int i = 1; i <= q; i++) {
    read(Q[i].op, Q[i].x);
    if (Q[i].op == 2) vis[Q[i].x] = 1;
  }
  for (int i = 1; i <= m; i++)
    if (!vis[i]) merge(E[i].u, E[i].v, q);
  for (int i = q; i >= 1; i--)
    if (Q[i].op == 2) merge(E[Q[i].x].u, E[Q[i].x].v, i);
  for (int i = 1; i <= ntot; i++)
    if (findroot(i) == i) dfs(i, 0);
  deal();
  for (int i = 1; i <= n; i++) insert(1, 1, ntot, dfn[i], a[i]);
  for (int i = 1; i <= q; i++) {
    if (Q[i].op == 1) {
      int u = Q[i].x;
      for (int j = 20; j >= 0; j--) {
        if (val[bz[u][j]] >= i) u = bz[u][j];
      }
      auto tmp = query(1, 1, ntot, dfn[u], dfn[u] + siz[u] - 1);
      write(tmp.first), putchar('\n');
      if (tmp.second != 0) insert(1, 1, ntot, tmp.second, 0);
    }
  }
}
