func_code_string: #include <bits/stdc++.h>   using namespace std;   const int N = 200005;   const int M = 400005;   inline int read() {     int x = 0, f = 1;     char ch = getchar();     while (!isdigit(ch)) {       if (ch ==  - ) f = -1;       ch = getchar();     }     while (isdigit(ch)) {       x = x * 10 + ch -  0 ;       ch = getchar();     }     return f * x;   }   int n, m, q, num;   int hd[N], nxt[M], to[M], tot;   inline void add(int x, int y) {     to[++tot] = y;     nxt[tot] = hd[x];     hd[x] = tot;   }   int dfn[N], low[N], dfn_cnt;   int st[N], tp;   bool vis[N];   vector<int> G[N];   void tarjan(int x) {     vis[x] = 1;     st[++tp] = x;     dfn[x] = low[x] = ++dfn_cnt;     for (int i = hd[x]; i; i = nxt[i]) {       int y = to[i];       if (!dfn[y]) {         tarjan(y);         low[x] = min(low[x], low[y]);         if (low[y] == dfn[x]) {           ++num;           while (st[tp + 1] != y) {             G[num].push_back(st[tp]);             G[st[tp]].push_back(num);             vis[st[tp--]] = 0;           }           G[num].push_back(x);           G[x].push_back(num);         }       } else if (vis[y])         low[x] = min(low[x], dfn[y]);     }   }   multiset<int> s[N];   int siz[N], fa[N], dep[N], son[N];   void dfs_son(int x, int f) {     fa[x] = f;     siz[x] = 1;     dep[x] = dep[f] + 1;     for (int i = 0; i < G[x].size(); i++) {       int y = G[x][i];       if (y == f) continue;       dfs_son(y, x);       siz[x] += siz[y];       if (siz[y] > siz[son[x]]) son[x] = y;     }   }   int rev[N], top[N];   void dfs_chain(int x, int tp) {     top[x] = tp;     dfn[x] = ++dfn_cnt;     rev[dfn_cnt] = x;     if (son[x]) dfs_chain(son[x], tp);     for (int i = 0; i < G[x].size(); i++) {       int y = G[x][i];       if (y == fa[x] || y == son[x]) continue;       dfs_chain(y, y);     }   }   int val[N << 2];   int w[N];   void build(int l, int r, int p) {     if (l == r) {       val[p] = w[rev[l]];       return;     }     build(l, ((l + r) >> 1), (p << 1));     build(((l + r) >> 1) + 1, r, (p << 1 | 1));     val[p] = min(val[(p << 1)], val[(p << 1 | 1)]);   }   void modify(int l, int r, int t, int v, int p) {     if (l == r) {       val[p] = v;       return;     }     if (t <= ((l + r) >> 1))       modify(l, ((l + r) >> 1), t, v, (p << 1));     else       modify(((l + r) >> 1) + 1, r, t, v, (p << 1 | 1));     val[p] = min(val[(p << 1)], val[(p << 1 | 1)]);   }   int query(int l, int r, int L, int R, int p) {     if (L <= l && r <= R) return val[p];     int ans = 0x3f3f3f3f;     if (L <= ((l + r) >> 1))       ans = min(ans, query(l, ((l + r) >> 1), L, R, (p << 1)));     if (R > ((l + r) >> 1))       ans = min(ans, query(((l + r) >> 1) + 1, r, L, R, (p << 1 | 1)));     return ans;   }   int get_min(int x, int y) {     int ans = 0x3f3f3f3f;     while (top[x] != top[y]) {       if (dep[top[x]] < dep[top[y]]) swap(x, y);       ans = min(ans, query(1, num, dfn[top[x]], dfn[x], 1));       x = fa[top[x]];     }     if (dfn[x] > dfn[y]) swap(x, y);     ans = min(ans, query(1, num, dfn[x], dfn[y], 1));     if (x > n) ans = min(ans, w[fa[x]]);     return ans;   }   int main() {     n = read();     m = read();     q = read();     for (int i = 1; i <= n; i++) w[i] = read();     num = n;     for (int i = 1, x, y; i <= m; i++) {       x = read();       y = read();       add(x, y), add(y, x);     }     tarjan(1);     dfn_cnt = 0;     dfs_son(1, 0);     dfs_chain(1, 1);     for (int i = 1; i <= n; i++)       if (fa[i]) s[fa[i]].insert(w[i]);     for (int i = n + 1; i <= num; i++) w[i] = *s[i].begin();     memset(val, 0x3f, sizeof(val));     build(1, num, 1);     char op;     int x, y;     while (q--) {       cin >> op;       x = read();       y = read();       if (op ==  C ) {         modify(1, num, dfn[x], y, 1);         if (fa[x]) {           s[fa[x]].erase(s[fa[x]].lower_bound(w[x]));           s[fa[x]].insert(y);           if (w[fa[x]] != *s[fa[x]].begin()) {             w[fa[x]] = *s[fa[x]].begin();             modify(1, num, dfn[fa[x]], w[fa[x]], 1);           }         }         w[x] = y;       } else         printf( %d n , get_min(x, y));     }     return 0;   }   