#include <bits/stdc++.h>
using namespace std;
vector<int> vec[100010];
struct node {
  int y, next;
} a[400010];
int len = 1, last[200010];
void ins(int x, int y) {
  a[++len].y = y;
  a[len].next = last[x];
  last[x] = len;
}
int w[200010], n, m, Q, A[200010];
int dfn[100010], low[100010], sta[100010], top = 0, id = 0, cnt;
void tarjan(int x, int fa) {
  low[x] = dfn[x] = ++id;
  sta[++top] = x;
  for (int i = last[x]; i; i = a[i].next) {
    if (i == (fa ^ 1)) continue;
    int y = a[i].y;
    if (dfn[y] == -1) {
      tarjan(y, i);
      if (low[y] >= dfn[x]) {
        cnt++;
        while (1) {
          int t = sta[top--];
          vec[cnt].push_back(t);
          if (t == y) break;
        }
        vec[cnt].push_back(x);
      } else
        low[x] = min(low[x], low[y]);
    } else
      low[x] = min(low[x], dfn[y]);
  }
}
struct trnode {
  int tot, top, fa, dep, son, lc, rc, c;
} tr[400010];
int tot = 0;
int ys[200010], z = 0;
void pre_node(int x, int fa) {
  tr[x].tot = 1;
  tr[x].fa = fa;
  tr[x].dep = tr[fa].dep + 1;
  for (int i = last[x]; i; i = a[i].next) {
    int y = a[i].y;
    if (y == fa) continue;
    pre_node(y, x);
    tr[x].tot += tr[y].tot;
    if (tr[tr[x].son].tot < tr[y].tot) tr[x].son = y;
  }
}
void pre_edge(int x, int top) {
  ys[x] = ++z;
  tr[x].top = top;
  if (tr[x].son) pre_edge(tr[x].son, top);
  for (int i = last[x]; i; i = a[i].next) {
    int y = a[i].y;
    if (y != tr[x].fa && y != tr[x].son) pre_edge(y, y);
  }
}
struct Priority_queue {
  priority_queue<int, vector<int>, greater<int> > q1, q2;
  Priority_queue() {
    while (!q1.empty()) q1.pop();
    while (!q2.empty()) q2.pop();
  }
  void push(int x) { q1.push(x); }
  void del(int x) { q2.push(x); }
  int top() {
    while (!q1.empty() && !q2.empty() && q1.top() == q2.top())
      q1.pop(), q2.pop();
    return q1.top();
  }
} q[200010];
int bt(int l, int r) {
  int x = ++tot;
  if (l != r) {
    int mid = (l + r) / 2;
    tr[x].lc = bt(l, mid);
    tr[x].rc = bt(mid + 1, r);
    tr[x].c = min(tr[tr[x].lc].c, tr[tr[x].rc].c);
  } else
    tr[x].c = A[l];
  return x;
}
void change(int x, int l, int r, int k, int c) {
  if (l == r) {
    tr[x].c = c;
    return;
  }
  int mid = (l + r) / 2;
  if (k <= mid)
    change(tr[x].lc, l, mid, k, c);
  else
    change(tr[x].rc, mid + 1, r, k, c);
  tr[x].c = min(tr[tr[x].lc].c, tr[tr[x].rc].c);
}
int findans(int x, int l, int r, int fl, int fr) {
  if (l == fl && r == fr) return tr[x].c;
  int mid = (l + r) / 2;
  if (fr <= mid) return findans(tr[x].lc, l, mid, fl, fr);
  if (fl > mid) return findans(tr[x].rc, mid + 1, r, fl, fr);
  return min(findans(tr[x].lc, l, mid, fl, mid),
             findans(tr[x].rc, mid + 1, r, mid + 1, fr));
}
int solve(int x, int y) {
  int tx = tr[x].top, ty = tr[y].top, ans = 1e9 + 7;
  while (tx != ty) {
    if (tr[tx].dep < tr[ty].dep) swap(tx, ty), swap(x, y);
    ans = min(ans, findans(1, 1, n + cnt, ys[tx], ys[x]));
    x = tr[tx].fa;
    tx = tr[x].top;
  }
  if (tr[x].dep < tr[y].dep) swap(x, y);
  ans = min(ans, findans(1, 1, n + cnt, ys[y], ys[x]));
  if (y > n) ans = min(ans, w[tr[y].fa]);
  return ans;
}
int main() {
  scanf("%d %d %d", &n, &m, &Q);
  for (int i = 1; i <= n; i++) scanf("%d", &w[i]);
  for (int i = 1; i <= m; i++) {
    int x, y;
    scanf("%d %d", &x, &y);
    ins(x, y);
    ins(y, x);
  }
  memset(dfn, -1, sizeof(dfn));
  tarjan(1, 0);
  len = 0;
  memset(last, 0, sizeof(last));
  for (int i = 1; i <= cnt; i++) {
    int x = i + n;
    for (int j = 0; j < vec[i].size(); j++) {
      int y = vec[i][j];
      ins(x, y);
      ins(y, x);
    }
  }
  pre_node(1, 0);
  pre_edge(1, 1);
  for (int i = 1; i <= cnt; i++) {
    int x = i + n;
    for (int j = 0; j < vec[i].size(); j++) {
      int y = vec[i][j];
      if (y == tr[x].fa) continue;
      q[x].push(w[y]);
    }
    w[x] = q[x].top();
  }
  for (int i = 1; i <= n + cnt; i++) A[ys[i]] = w[i];
  bt(1, n + cnt);
  while (Q--) {
    char ch[2];
    scanf("%s", ch);
    int x, y;
    scanf("%d %d", &x, &y);
    if (ch[0] == 'C') {
      if (tr[x].fa) q[tr[x].fa].del(w[x]);
      w[x] = y;
      change(1, 1, n + cnt, ys[x], w[x]);
      if (tr[x].fa)
        q[tr[x].fa].push(w[x]),
            w[tr[x].fa] = q[tr[x].fa].top(),
            change(1, 1, n + cnt, ys[tr[x].fa], w[tr[x].fa]);
    } else
      printf("%d\n", solve(x, y));
  }
}
