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;
inline long long read() {
  char ch;
  long long f = 1, res = 0;
  while ((ch = getchar()) < '0' || ch > '9')
    if (ch == '-') f = -1;
  while (ch >= '0' && ch <= '9') {
    res = (res << 1) + (res << 3) + (ch ^ 48);
    ch = getchar();
  }
  return f * res;
}
inline void pt(long long u, long long mod) {
  printf("%lld", u);
  if (mod == 1)
    putchar(' ');
  else if (mod == 2)
    putchar('\n');
}
long long tree[600000 * 5] = {0};
long long pre[600000];
long long value[600000];
long long laterSet[600000];
long long arrQue[600000][2];
long long edge[600000][2];
long long size[600000] = {0};
long long deep[600000] = {0};
long long oldInx[600000][2] = {0};
long long oldSize[600000][2] = {0};
long long cnt[600000] = {0};
long long frontInx[600000] = {0};
long long newArr[600000];
long long laterFinal[600000];
vector<long long> sub[600000];
bool used[600000] = {false};
long long n, m, q;
void up(long long inx) { tree[inx] = max(tree[inx << 1], tree[inx << 1 | 1]); }
void build(long long inx, long long left, long long right) {
  if (left == right) {
    tree[inx] = value[newArr[left]];
    return;
  }
  long long mid = (left + right) >> 1;
  build(inx << 1, left, mid);
  build(inx << 1 | 1, mid + 1, right);
  up(inx);
}
long long pos, vv;
void find(long long inx, long long left, long long right, long long findLeft,
          long long findRight) {
  if (findLeft <= left && right <= findRight) {
    if (tree[inx] > vv) {
      if (left == right) {
        pos = inx;
        vv = tree[inx];
        return;
      } else {
        long long mid = (left + right) >> 1;
        if (tree[inx << 1] == tree[inx]) {
          find(inx << 1, left, mid, findLeft, findRight);
        } else {
          find(inx << 1 | 1, mid + 1, right, findLeft, findRight);
        }
      }
    }
    return;
  }
  long long mid = (left + right) >> 1;
  if (findLeft <= mid) find(inx << 1, left, mid, findLeft, findRight);
  if (mid < findRight) find(inx << 1 | 1, mid + 1, right, findLeft, findRight);
}
long long inx = 1;
inline long long oriFind(long long x) {
  while (pre[x] != x) x = pre[x];
  return x;
}
inline long long find(long long x) {
  long long top = x, t;
  while (pre[top] != top) {
    top = pre[top];
  }
  while (pre[x] != x) {
    t = pre[x];
    pre[x] = top;
    x = t;
  }
  return top;
}
int main() {
  n = read(), m = read(), q = read();
  for (long long i = 1; i <= n; i++)
    value[i] = read(), pre[i] = i, size[i] = 1, deep[i] = 1, laterSet[i] = 0,
    laterFinal[i] = i;
  for (long long i = 1; i <= m; i++) edge[i][0] = read(), edge[i][1] = read();
  for (long long i = 1; i <= q; i++) {
    arrQue[i][0] = read(), arrQue[i][1] = read();
    if (arrQue[i][0] == 2) used[arrQue[i][1]] = true;
  }
  for (long long i = 1; i <= m; i++) {
    if (used[i]) continue;
    long long x = find(edge[i][0]), y = find(edge[i][1]);
    if (x != y) {
      pre[y] = x;
      size[x] += size[y];
      size[y] = 0;
    }
  }
  for (long long i = 1; i <= n; i++) {
    pre[i] = find(i);
    if (pre[i] != i) {
      laterSet[i] = i;
      sub[pre[i]].push_back(i);
    } else
      sub[i].push_back(i);
  }
  long long x, y;
  for (long long i = q; i >= 1; i--) {
    if (arrQue[i][0] == 2) {
      used[i] = true;
      x = edge[arrQue[i][1]][0], y = edge[arrQue[i][1]][1];
      x = oriFind(x), y = oriFind(y);
      if (x != y) {
        used[i] = false;
        oldInx[i][0] = x, oldInx[i][1] = y;
        oldSize[i][0] = size[x], oldSize[i][1] = size[y];
        if (deep[x] > deep[y]) {
          size[x] += size[y];
          pre[y] = x;
          laterSet[laterFinal[x]] = y;
          laterFinal[x] = laterFinal[y];
        } else if (deep[x] == deep[y]) {
          size[x] += size[y];
          pre[y] = x;
          laterSet[laterFinal[x]] = y;
          laterFinal[x] = laterFinal[y];
          deep[x]++;
        } else {
          size[y] += size[x];
          pre[x] = y;
          laterSet[laterFinal[y]] = x;
          laterFinal[y] = laterFinal[x];
        }
      }
    }
  }
  for (long long i = 1; i <= n; i++) cnt[laterSet[i]]++;
  for (long long i = 1; i <= n; i++)
    if (cnt[i] == 0) {
      long long z = i;
      while (z) {
        frontInx[z] = inx;
        for (auto u : sub[z]) {
          newArr[inx++] = u;
        }
        z = laterSet[z];
      }
    }
  build(1, 1, n);
  for (long long i = 1; i <= q; i++) {
    if (arrQue[i][0] == 1) {
      long long p = oriFind(arrQue[i][1]);
      vv = -1;
      find(1, 1, n, frontInx[p], frontInx[p] + size[p] - 1);
      pt(vv, 2);
      tree[pos] = 0;
      if (vv != 0) {
        pos /= 2;
        while (pos) {
          up(pos);
          pos /= 2;
        }
      }
    } else {
      if (used[i])
        continue;
      else {
        pre[oldInx[i][0]] = oldInx[i][0];
        pre[oldInx[i][1]] = oldInx[i][1];
        size[oldInx[i][0]] = oldSize[i][0];
        size[oldInx[i][1]] = oldSize[i][1];
      }
    }
  }
  return 0;
}
