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;
int p[200010], b[300010];
int eu[300010], ev[300010];
int qt[500010], qx[500010];
int par[200010];
int find(int x) { return par[x] < 0 ? x : (par[x] = find(par[x])); }
vector<int> qd[500010];
set<pair<int, int> > s[200010];
int ch[500010][2];
void unite(int x, int y, int tm = -1) {
  x = find(x);
  y = find(y);
  if (x == y) return;
  if (par[x] > par[y]) swap(x, y);
  if (tm >= 0) {
    for (set<pair<int, int> >::iterator it = s[y].begin(); it != s[y].end();
         it++) {
      qd[tm].push_back(it->second);
    }
    ch[tm][0] = x;
    ch[tm][1] = y;
  }
  par[x] += par[y];
  par[y] = x;
  s[x].insert(s[y].begin(), s[y].end());
  s[y].clear();
}
int main() {
  int n, m, q;
  scanf("%d%d%d", &n, &m, &q);
  for (int i = 0; i < n; i++) {
    scanf("%d", &p[i]);
  }
  for (int i = 0; i < m; i++) {
    scanf("%d%d", &eu[i], &ev[i]);
    --eu[i], --ev[i];
  }
  for (int i = 0; i < q; i++) {
    scanf("%d%d", &qt[i], &qx[i]);
    --qx[i];
    if (qt[i] == 2) b[qx[i]] = 1;
  }
  for (int i = 0; i < n; i++) {
    par[i] = -1;
    s[i].insert(make_pair(-p[i], i));
  }
  for (int i = 0; i < m; i++) {
    if (!b[i]) {
      unite(eu[i], ev[i]);
    }
  }
  for (int i = q - 1; i >= 0; i--) {
    if (qt[i] == 2) {
      ch[i][0] = -1;
      unite(eu[qx[i]], ev[qx[i]], i);
    }
  }
  for (int i = 0; i < q; i++) {
    if (qt[i] == 2) {
      if (ch[i][0] != -1) {
        int x = ch[i][0], y = ch[i][1];
        for (int j = 0; j < qd[i].size(); j++) {
          int k = qd[i][j];
          s[x].erase(make_pair(-p[k], k));
          s[y].insert(make_pair(-p[k], k));
          par[k] = y;
        }
        par[y] = -1;
      }
    } else {
      int k = find(qx[i]);
      int x = s[k].begin()->first, j = s[k].begin()->second;
      printf("%d\n", -x);
      s[k].erase(s[k].begin());
      p[j] = 0;
      s[k].insert(make_pair(0, j));
    }
  }
  return 0;
}
