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;
const int maxn = 200000, maxm = 300000, maxq = 500000, maxt = maxn * 4;
int n, m, Q, a[maxn + 5], X[maxm + 5], Y[maxm + 5], tp[maxq + 5], v[maxq + 5];
bool del[maxm + 5], vis[maxm + 5];
int ID[maxn + 5];
set<pair<int, int> > S[maxn + 5];
set<pair<int, int> >::iterator it;
int fat[maxn + 5], dep[maxn + 5], lst[maxm + 5], top;
pair<int*, int> stk[maxt + 5];
inline char readc() {
  static char buf[100000], *l = buf, *r = buf;
  return l == r && (r = (l = buf) + fread(buf, 1, 100000, stdin), l == r)
             ? EOF
             : *l++;
}
template <typename T>
int readi(T& x) {
  T tot = 0;
  char ch = readc(), lst = '+';
  while (!isdigit(ch)) {
    if (ch == EOF) return EOF;
    lst = ch;
    ch = readc();
  }
  while (isdigit(ch)) tot = (tot << 3) + (tot << 1) + (ch ^ 48), ch = readc();
  lst == '-' ? x = -tot : x = tot;
  return ((ch) == 10 || (ch) == 13 || (ch) == EOF);
}
void Change(int* x, int y) {
  stk[++top] = make_pair(x, *x);
  *x = y;
}
void Pop(int lst) {
  while (top != lst) *stk[top].first = stk[top].second, top--;
}
int getfa(int x) { return x == fat[x] ? x : getfa(fat[x]); }
void Merge(int i, int x, int y) {
  x = getfa(x);
  y = getfa(y);
  if (x == y) return;
  vis[i] = true;
  lst[i] = top;
  if (dep[x] < dep[y]) swap(x, y);
  if (dep[x] == dep[y]) Change(&dep[x], dep[x] + 1);
  Change(&fat[y], x);
  if (S[ID[x]].size() < S[ID[y]].size()) {
    int t = ID[x];
    Change(&ID[x], ID[y]);
    Change(&ID[y], t);
  }
  for (it = S[ID[y]].begin(); it != S[ID[y]].end(); it++) S[ID[x]].insert(*it);
}
int Ask(int v) {
  int ro = getfa(v), i = ID[ro];
  while (!S[i].empty()) {
    it = S[i].begin();
    int A = (*it).first, x = (*it).second;
    S[i].erase(it);
    if (-A != a[x]) continue;
    if (getfa(x) != ro) continue;
    a[x] = 0;
    return -A;
  }
  return 0;
}
int main() {
  readi(n);
  readi(m);
  readi(Q);
  for (int i = 1; i <= n; i++)
    readi(a[i]), ID[i] = i, S[i].insert(make_pair(-a[i], i)), fat[i] = i;
  for (int i = 1; i <= m; i++) readi(X[i]), readi(Y[i]);
  for (int i = 1; i <= Q; i++) {
    readi(tp[i]);
    readi(v[i]);
    if (tp[i] == 2) del[v[i]] = true;
  }
  for (int i = 1; i <= m; i++)
    if (!del[i]) Merge(i, X[i], Y[i]);
  for (int i = Q; i >= 1; i--)
    if (tp[i] == 2) Merge(v[i], X[v[i]], Y[v[i]]);
  for (int i = 1; i <= Q; i++)
    if (tp[i] == 1)
      printf("%d\n", Ask(v[i]));
    else if (vis[v[i]])
      Pop(lst[v[i]]);
  return 0;
}
