#include <bits/stdc++.h>
using namespace std;
const int N = 301000, inf = 1e9 + 1e4;
int read() {
  int res = 0, f = 1;
  char c = getchar();
  for (; !isdigit(c); c = getchar())
    if (c == '-') f = -1;
  for (; isdigit(c); c = getchar()) res = (res << 1) + (res << 3) + (c ^ '0');
  return res * f;
}
int n, m, q, w[N], maxn;
bool is_sqr[N];
vector<int> G[N], T[N];
int dfn[N], dfc, low[N], stk[N], stk_top;
bool instk[N];
int bcnt, bel[N], Siz[N];
struct Set {
  multiset<int> s;
  void ins(int x) { s.insert(x); }
  void del(int x) { s.erase(s.find(x)); }
  int min() { return *s.begin(); }
} s[100005];
void add_edge(int u, int v) {
  T[u].push_back(v);
  T[v].push_back(u);
}
void Tarjan(int u, int prt) {
  low[u] = dfn[u] = ++dfc;
  stk[++stk_top] = u;
  for (auto to : G[u]) {
    if (to == prt) continue;
    if (!dfn[to]) {
      Tarjan(to, u);
      low[u] = min(low[u], low[to]);
      if (low[to] > dfn[u]) {
        add_edge(u, to);
        while (true) {
          int x = stk[stk_top--];
          if (x == to) break;
        }
      } else if (low[to] == dfn[u]) {
        int sx = ++maxn;
        is_sqr[sx] = 1;
        add_edge(u, sx);
        while (true) {
          int x = stk[stk_top--];
          add_edge(sx, x);
          s[sx].ins(w[x]);
          if (x == to) break;
        }
        w[sx] = s[sx].min();
      }
    } else
      low[u] = min(low[u], dfn[to]);
  }
}
int siz[N], son[N], top[N], fa[N], dep[N], out[N];
void DFS(int u, int prt) {
  siz[u] = 1;
  for (auto to : T[u]) {
    if (to == prt) continue;
    dep[to] = dep[u] + 1;
    DFS(to, u);
    siz[u] += siz[to];
    fa[to] = u;
    if (!son[u] || siz[son[u]] < siz[to]) son[u] = to;
  }
}
void DFS2(int u, int prt, int t) {
  top[u] = t;
  out[dfn[u] = ++dfc] = u;
  if (son[u]) DFS2(son[u], u, t);
  for (auto to : T[u]) {
    if (to == son[u] || to == prt) continue;
    DFS2(to, u, to);
  }
}
int mn[N << 2];
void up(int x) { mn[x] = min(mn[x << 1], mn[x << 1 | 1]); }
void build(int x, int s = 1, int t = maxn) {
  if (s == t) return mn[x] = w[out[s]], void();
  int mid = s + t >> 1;
  build(x << 1, s, mid);
  build(x << 1 | 1, mid + 1, t);
  up(x);
}
void modify(int x, int p, int s = 1, int t = maxn) {
  if (s == t) return mn[x] = w[out[s]], void();
  int mid = s + t >> 1;
  if (p <= mid)
    modify(x << 1, p, s, mid);
  else
    modify(x << 1 | 1, p, mid + 1, t);
  up(x);
}
int query(int x, int qs, int qt, int s = 1, int t = maxn) {
  if (qs <= s && t <= qt) return mn[x];
  int mid = s + t >> 1, res = inf;
  if (qs <= mid) res = min(res, query(x << 1, qs, qt, s, mid));
  if (qt > mid) res = min(res, query(x << 1 | 1, qs, qt, mid + 1, t));
  return res;
}
int solve(int x, int y) {
  int res = inf;
  while (top[x] != top[y]) {
    if (dep[top[x]] < dep[top[y]]) swap(x, y);
    res = min(res, query(1, dfn[top[x]], dfn[x]));
    x = fa[top[x]];
  }
  if (dep[x] > dep[y]) swap(x, y);
  res = min(res, query(1, dfn[x], dfn[y]));
  if (is_sqr[x]) res = min(res, w[fa[x]]);
  return res;
}
int main() {
  n = read();
  m = read();
  q = read();
  for (int i = 1; i <= n; ++i) w[i] = read();
  for (int i = 1, u, v; i <= m; ++i) {
    u = read();
    v = read();
    G[u].push_back(v);
    G[v].push_back(u);
  }
  maxn = n;
  Tarjan(1, 0);
  dfc = 0;
  fill(dfn + 1, dfn + maxn + 1, 0);
  DFS(1, 0);
  DFS2(1, 0, 1);
  build(1, 1, maxn);
  char opt[4];
  for (int i = 1, x, y, sx; i <= q; ++i) {
    scanf("%s", opt);
    if (opt[0] == 'A') {
      x = read();
      y = read();
      cout << solve(x, y) << '\n';
    } else {
      x = read();
      y = read();
      sx = fa[x];
      if (is_sqr[sx]) {
        s[sx].del(w[x]);
        s[sx].ins(y);
        w[sx] = s[sx].min();
        modify(1, dfn[sx]);
      }
      w[x] = y;
      modify(1, dfn[x]);
    }
  }
  return 0;
}
