#include <bits/stdc++.h>
using namespace std;
const int N = 4e5 + 7, M = 20;
char g;
struct tree {
  int a, b, c, t;
} tr[N << 1];
struct edge {
  int a, b;
} ed[N], edg[N];
set<int> hig[N];
map<int, int> s[N];
int n, m, k, siz, res, tota, totb, lint, themin, w[N], fa[N], fb[N], st[N],
    dep[N], pos[N], ret[N], ffa[N], fson[N], low[N], dfn[N], dfsn[N], e[N][M];
inline int read() {
  int num = 0;
  g = getchar();
  while (g < 48 || 57 < g) g = getchar();
  while (47 < g && g < 58)
    num = (num << 1) + (num << 3) + g - 48, g = getchar();
  return num;
}
inline int Min(int a, int b) {
  if (a < b) return a;
  return b;
}
inline int Max(int a, int b) {
  if (a > b) return a;
  return b;
}
inline void addedgea(int a, int b) {
  tota++, ed[tota].a = b, ed[tota].b = fa[a], fa[a] = tota;
}
inline void addedgeb(int a, int b) {
  totb++, edg[totb].a = b, edg[totb].b = fb[a], fb[a] = totb;
}
inline void tarjan(int u) {
  dfn[u] = low[u] = ++siz, st[++st[0]] = u;
  for (int i = fa[u]; i > 0; i = ed[i].b) {
    int x = ed[i].a;
    if (dfn[x])
      low[u] = Min(low[u], dfn[x]);
    else {
      tarjan(x), low[u] = Min(low[u], low[x]);
      if (low[x] >= dfn[u]) {
        res++, addedgeb(res, u), addedgeb(u, res);
        while (st[st[0] + 1] != x)
          addedgeb(res, st[st[0]]), addedgeb(st[st[0]--], res);
      }
    }
  }
}
inline void find(int u) {
  int z = 1;
  ret[u] = 1;
  while ((1 << z) < dep[u]) e[u][z] = e[e[u][z - 1]][z - 1], z++;
  for (int i = fb[u]; i > 0; i = edg[i].b) {
    int x = edg[i].a;
    if (fa[u] != x) {
      fa[x] = u, dep[x] = dep[u] + 1, e[x][0] = u, find(x);
      if (u > n) {
        if (!s[u][w[x]]) hig[u].insert(w[x]);
        s[u][w[x]]++;
      }
      if (ret[x] > ret[fson[u]]) fson[u] = x;
      ret[u] += ret[x];
    }
  }
}
inline void search(int u) {
  if (!ffa[u]) ffa[u] = u;
  dfsn[u] = ++lint;
  if (fson[u])
    ffa[fson[u]] = ffa[u], search(fson[u]);
  else
    fson[u] = u;
  for (int i = fb[u]; i > 0; i = edg[i].b) {
    int x = edg[i].a;
    if (fa[u] != x && fson[u] != x) search(x);
  }
}
inline void build(int a, int b, int c) {
  tr[c].a = a, tr[c].b = b, tr[c].c = (a + b) >> 1;
  if (a == b) {
    pos[a] = c;
    return;
  }
  build(tr[c].a, tr[c].c, c << 1), build(tr[c].c + 1, tr[c].b, c << 1 | 1);
}
inline void inser(int u, int x) {
  tr[u].t = x, u = u >> 1;
  while (u > 0) tr[u].t = Min(tr[u << 1].t, tr[u << 1 | 1].t), u = u >> 1;
}
inline int lca(int a, int b) {
  if (dep[a] < dep[b]) swap(a, b);
  int z = dep[a] - dep[b];
  for (int x = 18; x >= 0; x--)
    if (z & (1 << x)) a = e[a][x];
  if (a == b) return a;
  for (int x = 18; x >= 0; x--)
    if (e[a][x] != e[b][x]) a = e[a][x], b = e[b][x];
  return e[a][0];
}
inline void searchans(int a, int b, int c) {
  if (tr[c].a == a && tr[c].b == b) {
    themin = Min(tr[c].t, themin);
    return;
  }
  if (a <= tr[c].c) searchans(a, Min(b, tr[c].c), c << 1);
  if (tr[c].c < b) searchans(Max(tr[c].c + 1, a), b, c << 1 | 1);
}
inline void write(int u) {
  if (u > 9) write(u / 10);
  putchar(u % 10 + '0');
}
int main() {
  n = read(), m = read(), k = read(), res = n, build(1, n << 1, 1);
  int a, b, c;
  for (int i = 1; i <= n; i++) w[i] = read();
  for (int i = 1; i <= m; i++)
    a = read(), b = read(), addedgea(a, b), addedgea(b, a);
  tarjan(1), fa[1] = 0, dep[1] = 1, find(1), search(1);
  for (int i = 1; i <= n; i++) inser(pos[dfsn[i]], w[i]);
  for (int i = n + 1; i <= res; i++) inser(pos[dfsn[i]], *hig[i].begin());
  for (int i = 1; i <= k; i++) {
    g = getchar();
    while (g != 'A' && g != 'C') g = getchar();
    if (g == 'C') {
      a = read(), b = read();
      if (fa[a]) {
        s[fa[a]][w[a]]--;
        if (!s[fa[a]][w[a]]) hig[fa[a]].erase(w[a]);
        w[a] = b;
        if (!s[fa[a]][w[a]]) hig[fa[a]].insert(w[a]);
        s[fa[a]][w[a]]++;
        inser(pos[dfsn[fa[a]]], *hig[fa[a]].begin());
      }
      w[a] = b, inser(pos[dfsn[a]], w[a]);
    } else {
      a = read(), b = read(), c = lca(a, b), themin = 1e9 + 7;
      while (ffa[a] != ffa[c])
        searchans(dfsn[ffa[a]], dfsn[a], 1), a = fa[ffa[a]];
      while (ffa[b] != ffa[c])
        searchans(dfsn[ffa[b]], dfsn[b], 1), b = fa[ffa[b]];
      searchans(dfsn[c], dfsn[a], 1), searchans(dfsn[c], dfsn[b], 1);
      if (c > n) themin = Min(themin, w[fa[c]]);
      write(themin), putchar('\n');
    }
  }
  return 0;
}
