//b.c B-Resale
#include<stdio.h>

int main(void){
    int n;
    scanf("%d",&n);
    int v[n],c[n];
    for(int i=0;i<n;++i){
        scanf("%d",v+i);
    }
    for(int i=0;i<n;++i){
        scanf("%d",c+i);
    }

    int x=0,y=0;
    for(int i=0;i<n;++i){
        if(v[i]-c[i]>0){
            x += v[i];
            y += c[i];
        }
    }
    printf("%d\n",x-y);
    return 0;
}


#include <stdio.h>
int main(int argc, char const *argv[]) {
  int N,i,w;
  int V[20],C[20];

  scanf("%d\n",&N );
  for ( i = 0; i < N; i++) {
    scanf("%d ",&V[i] );
  }
  printf("\n" );
  for ( i = 0; i < N; i++) {
    scanf("%d ",&C[i] );
  }

  w = 0;

  for ( i = 0; i < N; i++) {
    if(V[i] - C[i] > 0){
      w = w + (V[i] - C[i]);
    }
  }

  printf("%d\n",w);

  return 0;
}


#include<stdio.h>
int main(){
	int N;
	int a;
	int X_Y=0;

	scanf("%d",&N);

	int V_C[2][20];

	for(int i=0;i<=N-1;i++){
		scanf("%d",&a);
		V_C[0][i]=a;
	}

	for(int i=0;i<=N-1;i++){
		scanf("%d",&a);
		V_C[1][i]=a;
	}

	for(int i=0;i<=N-1;i++){
		if(V_C[0][i]>V_C[1][i]){
			X_Y+=V_C[0][i]-V_C[1][i];
		}
	}

	printf("%d",X_Y);
	return(0);
}


#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#define rep(i,n) for(i=0;i<n;i++)
#define ll long long
#define PI 3.14159265358979323846264338327950L
int main(){
    int n,i;
    scanf("%d",&n);
    int c[n],v[n],ans=0;
    rep(i,n) scanf("%d",&v[n]);
    rep(i,n){
        scanf("%d",&c[n]);
        if(v[n]-c[n]>0){
            ans+=v[n]-c[n];
        }
    }
    printf("%d",ans);
    return 0;
}


#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#define rep(i,n) for(i=0;i<n;i++)
#define ll long long
#define PI 3.14159265358979323846264338327950L
int main(){
    int n,i;
    scanf("%d",&n);
    int c[n],v[n],ans=0;
    rep(i,n) scanf("%d",&v[n]);
    rep(i,n){
        scanf("%d",&c[n]);
        if(v[n]-c[n]>0){
            cost+=v[n]-c[n];
        }
    }
    printf("%d",ans);
    return 0;
}


#include <stdio.h>
int main(void){
    int N, i, X, Y, ans;
    int V[50];
    int C[50];

    scanf("%d", &N);
    ans= 0;

    for(i = 0; i < N; i++){
        scanf("%d", &V[i]);
        //printf("%d\n", V[i]);
    }

    for(i = 0; i < N; i++){
        scanf("%d", &C[i]);
        //printf("%d\n", C[i]);
    }

    for(i = 0; i < N; i++){
        if(V[i]>C[i]){
            X = X + V[i];
            //printf("   %d", X);
            Y = Y + C[i];
            //printf("%d\n", Y);
        }
    }

    ans = X - Y -1;
    printf("%d", ans);

}


"use strict";

// read lines from stdin
const input = require("fs")
  .readFileSync("/dev/stdin", "utf8")
  .split("\n");

const N = parseInt(input[0], 10);
const V = input[1].split(" ").map((val) => parseInt(val, 10));
const C = input[2].split(" ").map((val) => parseInt(val, 10));

let ans = 0;

for (let i = 0; i < N; i++) {
  if (V[i] > C[i]) {
    ans += V[i] - C[i];
  }
}

console.log(ans);


function Main(stdin){
stdin = stdin.trim().split("\n").reverse();

function input(){return stdin.pop()};
var stdout = [];
function print(x){stdout.push(x)};

var n = parseInt(input());
var v = input().split(" ").map(n=>parseInt(n));
var c = input().split(" ").map(n=>parseInt(n));

var ans = 0;
for (i=0; i < n; i++){
    ans += Math.max(0, v[i]-c[i])
}

print(ans);

stdout = stdout.join("\n");
console.log(stdout);
return stdout
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"))


// inputに入力データ全体が入る
function Main(input) {
    // 入力を解釈
	input = input.split("\n");
	tmp0 = input[0];
	tmp1Array = input[1].split(" ");
	tmp2Array = input[2].split(" ");

	var length = tmp1Array.length;
	var totalValue = 0;
	for(var i = 0 ; i <= length ; i++){
	    var temp = tmp1Array[i] -  tmp2Array[i];

	    if(temp > 0){
	        totalValue += temp;
	    }
	}

	// 文字を10進数に変換
	// var a = parseInt(input[0], 10);

	//出力
	console.log(totalValue);
}

// var counter = function(str,seq){
//     return str.split(seq).length - 1;
// }

Main(require("fs").readFileSync("/dev/stdin", "utf8"));


function Main(input){
	input = input.split("\n");
	var a = input[1].split(" ").map(Number);
	var b = input[2].split(" ").map(Number);
	var sum = 0;
	for(var i=0;i<input.length;i++){
		if((a[i]-b[i])>0) sum+=(a[i]-b[i]);
	}
	console.log(sum);
}Main(require("fs").readFileSync("/dev/stdin", "utf8").trim());


function Main(input){
	input = input.split("\n");
	var a = input[0].split(" ").map(Number);
	var b = input[1].split(" ").map(Number);
	var sum = 0;
	for(var i=0;i<input.length;i++){
		if(a[0]-b[0]>0) sum+=(a[0]-b[0]);
	}
	console.log(sum);
}Main(require("fs").readFileSync("/dev/stdin", "utf8").trim());


function Main(stdin){
stdin = stdin.trim().split("\n").reverse();

function input(){return stdin.pop()};
var stdout = [];
function print(x){stdout.push(x)};

var n = parseInt(input());
var v = input().split(" ").map(n=>parseInt(n));
var c = input().split(" ").map(n=>parseInt(n));

var ans = 0;
for (i=0; i < n; i++){
    ans += Math.max(0, v[i]-c[i])
}

print(ans);

stdout = stdout.join("\n");
console.log(stdout);
return stdout
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"))

`
`; var stdin = `
3
10 2 5
6 3 4
5

4
13 21 6 19
11 30 6 15
6

1
1
50
0
`;


package main

import (
	"fmt"
)

func main(){
	var N int
	fmt.Scan(&N)

	var V[20] int
	var C[20] int

	for i:=0; i < N; i++ {
		fmt.Scan(&V[i])
	}
	for i:=0; i < N; i++ {
		fmt.Scan(&C[i])
	}
	res := 0
	for i:=0; i < N; i++ {
		if V[i]-C[i] <= 0 {
			continue
		}
		res = res + V[i]-C[i]
	}
	fmt.Println(res)
}


package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
	"reflect"
	"sort"
	"strconv"
	"strings"
	// "regexp"
)

type jewel struct {
	value int64
	cost  int64
}

/* sort */
type pair struct {
	index  int64
	p1, p2 interface{}
}
type pairs []pair

func (slice pairs) Len() int {
	return len(slice)
}

func (slice pairs) Less(i, j int) bool {
	return slice[i].index < slice[j].index
}

func (slice pairs) Swap(i, j int) {
	slice[i], slice[j] = slice[j], slice[i]
}

/* sort */
type Int64Slice []int64

func (slice Int64Slice) Len() int {
	return len(slice)
}

func (slice Int64Slice) Less(i, j int) bool {
	return slice[i] < slice[j]
}

func (slice Int64Slice) Swap(i, j int) {
	slice[i], slice[j] = slice[j], slice[i]
}
func Int64s(a []int64)                    { sort.Sort(Int64Slice(a)) }
func Int64sSliceAreSorted(a []int64) bool { return sort.IsSorted(Int64Slice(a)) }

const (
	initialBufSize = 1e4
	maxBufSize     = 1e8
	INF            = 1e8
)

var (
	scanner = bufio.NewScanner(os.Stdin)
	writer  = bufio.NewWriter(os.Stdout)
	di      = []int64{-1, 0, 1, 0}
	dj      = []int64{0, -1, 0, 1}
)

func main() {
	buf := make([]byte, initialBufSize)
	scanner.Buffer(buf, maxBufSize)
	scanner.Split(bufio.ScanWords)
	N := readInt()
	V := make([]int64, N)
	C := make([]int64, N)
	Jewels := make([]jewel, N)
	for i := int64(0); i < N; i++ {
		V[i] = readInt()
	}
	for i := int64(0); i < N; i++ {
		C[i] = readInt()
	}
	for i := int64(0); i < N; i++ {
		Jewels[i] = jewel{V[i], C[i]}
	}
	sum := int64(0)
	for i := 0; i < len(Jewels); i++ {
		if Jewels[i].value/Jewels[i].cost >= 1 {
			sum += Jewels[i].value - Jewels[i].cost
		}
	}
	fmt.Println(sum)
}

/*==========================================
 *             Library
 *==========================================*/
func NextPermutation(x sort.Interface) bool {
	n := x.Len() - 1
	if n < 1 {
		return false
	}
	j := n - 1
	for ; !x.Less(j, j+1); j-- {
		if j == 0 {
			return false
		}
	}
	l := n
	for !x.Less(j, l) {
		l--
	}
	x.Swap(j, l)
	for k, l := j+1, n; k < l; {
		x.Swap(k, l)
		k++
		l--
	}
	return true
}
func doubleAry(h int64, w int64, init int64) (res [][]int64) {
	res = make([][]int64, h)
	for i := int64(0); i < h; i++ {
		res[i] = make([]int64, w)
		for j := int64(0); j < w; j++ {
			res[i][j] = init
		}
	}
	return
}

func aryEq(a []int64, b []int64) bool {
	return reflect.DeepEqual(a, b)
}

func clone(n []int64) (r []int64) {
	r = make([]int64, len(n))
	for i := 0; i < len(n); i++ {
		r[i] = n[i]
	}
	return
}
func write(s string) {
	writer.WriteString(s)
}

func print() {
	writer.Flush()
}

// scanner.Split(bufio.ScanWords) をコメントアウトしないと使用不可
func readLine() (s string) {
	if scanner.Scan() {
		s = scanner.Text()
	}
	return s
}

func readInt() (read int64) {
	scanner.Scan()
	read, err := strconv.ParseInt(scanner.Text(), 10, 64)
	if err != nil {
		panic(err)
	}
	return
}

func readFloat() (read float64) {
	scanner.Scan()
	read, err := strconv.ParseFloat(scanner.Text(), 64)
	if err != nil {
		panic(err)
	}
	return
}

func readRunes() (read []rune) {
	scanner.Scan()
	for _, v := range scanner.Text() {
		read = append(read, v)
	}
	return
}

func readString() (read string) {
	scanner.Scan()
	read = scanner.Text()
	return
}

func readStrings() (read []string) {
	scanner.Scan()
	for _, v := range scanner.Text() {
		read = append(read, string(v))
	}
	return
}

func s2i(s string) int64 {
	var intVal, e = strconv.ParseInt(s, 10, 64)
	if e != nil {
		panic(e)
	}
	return intVal
}

func i2s(i int64) string {
	var strVal = strconv.FormatInt(i, 10)
	return strVal
}

func s2f(s string) float64 {
	var floatVal, e = strconv.ParseFloat(s, 64)
	if e != nil {
		panic(e)
	}
	return floatVal
}

func abs(i int64) int64 {
	return int64(math.Abs(float64(i)))
}

func sum(i []int64) int64 {
	sum := int64(0)
	for _, val := range i {
		sum += val
	}
	return sum
}

func split(s string) []string {
	return strings.Fields(s)
}

func strAry2intAry(strs []string) []int64 {
	var ret = make([]int64, 0, len(strs))
	for _, str := range strs {
		var intVal = s2i(str)
		ret = append(ret, intVal)
	}
	return ret
}

func intAry2strAry(nums []int64) []string {
	var ret = make([]string, 0, len(nums))
	for _, num := range nums {
		var strVal = i2s(num)
		ret = append(ret, strVal)
	}
	return ret
}

func ary2str(strs []string) string {
	return strings.Join(strs, " ")
}

func reverse(res []int64) []int64 {
	for i, j := 0, len(res)-1; i < j; i, j = i+1, j-1 {
		res[i], res[j] = res[j], res[i]
	}
	return res
}
func reverseStr(res []string) []string {
	for i, j := 0, len(res)-1; i < j; i, j = i+1, j-1 {
		res[i], res[j] = res[j], res[i]
	}
	return res
}

func ini(res []int, init int) {
	if len(res) == 0 {
		return
	}
	res[0] = init
	for i := 0; i < len(res); i++ {
		copy(res[i:], res[:i])
	}
}

//
// func regexpExample() {
//     // Your code here!
//     var str = "13:20"
//     r := regexp.MustCompile(`(\d+):(\d+)`)
//     fmt.Println(r.FindStringSubmatch(str))
// }

// type Country struct {
//     gold int
//     silver int
//     blonze int
// }

// // 複数ソートのサンプル
// func stableSortExample() []Country{
//     var country = []Country {
//         {gold:1, silver:2, blonze:3},
//         {gold:1, silver:2, blonze:3},
//         {gold:1, silver:3, blonze:2},
//         {gold:1, silver:3, blonze:3},
//     }
//     sort.SliceStable(country, func(i, j int) bool { return country[i].blonze > country[j].blonze })
//     sort.SliceStable(country, func(i, j int) bool { return country[i].silver > country[j].silver })
//     sort.SliceStable(country, func(i, j int) bool { return country[i].gold > country[j].gold })
//     return country
// }


package main

import "fmt"

func main() {
	var n int
	var v, c []int

	fmt.Scan(&n)
	v = make([]int, n)
	for i := 0; i < n; i++ {
		fmt.Scan(&v[i])
	}
	c = make([]int, n)
	for i := 0; i < n; i++ {
		fmt.Scan(&c[i])
	}

	var res int
	for i, v := range v {
		if v > c[i] {
			res += v - c[i]
		}
	}
	fmt.Println(res)
}


package main

import (
	"fmt"
	"sort"
)

func main() {
	var n int
	fmt.Scan(&n)
	result, v, c := make([]int, n), make([]int, n), make([]int, n)
	for i := 0; i < n; i++ {
		fmt.Scan(&v[i])
	}
	for i := 0; i < n; i++ {
		fmt.Scan(&c[i])
	}
	for i := 0; i < n; i++ {
		result[i] = v[i] - c[i]
	}
	sort.Sort(sort.Reverse(sort.IntSlice(result)))
	if n == 1 {
		fmt.Print(0)
	} else {
		fmt.Print(result[0] + result[1])
	}
}


package main

import (
	"bufio"
	"fmt"
	"os"
	"sort"
	"strconv"
)

func out(x ...interface{}) {
	fmt.Println(x...)
}

var sc = bufio.NewScanner(os.Stdin)

func getInt() int {
	sc.Scan()
	i, e := strconv.Atoi(sc.Text())
	if e != nil {
		panic(e)
	}
	return i
}

func getString() string {
	sc.Scan()
	return sc.Text()
}

// min, max, asub, absなど基本関数
func max(a, b int) int {
	if a > b {
		return a
	}
	return b
}

func min(a, b int) int {
	if a < b {
		return a
	}
	return b
}

func asub(a, b int) int {
	if a > b {
		return a - b
	}
	return b - a
}

func abs(a int) int {
	if a >= 0 {
		return a
	}
	return -a
}

func lowerBound(a []int, x int) int {
	idx := sort.Search(len(a), func(i int) bool {
		return a[i] >= x
	})
	return idx
}

func upperBound(a []int, x int) int {
	idx := sort.Search(len(a), func(i int) bool {
		return a[i] > x
	})
	return idx
}

func main() {
	sc.Split(bufio.ScanWords)
	N := getInt()
	c := make([]int, N)
	v := make([]int, N)
	for i := 0; i < N; i++ {
		v[i] = getInt()
	}
	for i := 0; i < N; i++ {
		c[i] = getInt()
	}
	n := 1 << uint(N)
	ans := -10001000100
	for i := 0; i < n; i++ {
		C := 0
		V := 0
		for j := 0; j < N; j++ {
			if (i>>j)%2 == 1 {
				C += c[j]
				V += v[j]
			}
		}
		// fmt.Printf("%b %d %d\n", i, V, C)
		ans = max(ans, V-C)
	}
	out(ans)
}


package main

import (
	"fmt"
)

func main() {
	var n int
	fmt.Scan(&n)

	vs := make([]int, n)
	cs := make([]int, n)
	for i := 0; i < n; i++ {
		fmt.Scan(&vs[i])
		fmt.Scan(&cs[i])
	}

	r := 0
	for i := 0; i < n; i++ {
		if vs[i] > cs[i] {
			r += vs[i] - cs[i]
		}
	}

	fmt.Print(r)
}


_ = gets
v_ary = gets.chomp.split.map(&:to_i)
c_ary = gets.chomp.split.map(&:to_i)
sum = 0

v_ary.length.times do |i|
  if v_ary[i] > c_ary[i]
    sum += v_ary[i] - c_ary[i]
  end
end
puts sum


n = gets.split(" ").map(&:to_i)

v = []

v = gets.split(" ").map(&:to_i)

c = []

c = gets.split(" ").map(&:to_i)

v_c = [v,c].transpose.map{|a| a.inject(:-) }

v_c = v_c.sort

sum = 0

v_c.each do |v_c|
  if v_c <= 0
    next
  end
  sum += v_c

end

print sum


#
N = gets.chomp.to_i
V = gets.chomp.split.map(&:to_i)
C = gets.chomp.split.map(&:to_i)
sum = 0
(0..(N-1)).each do |i|
  sum = sum + (V[i] - C[i]) if V[i] > C[i]
end
puts sum


n=gets.to_i
v=gets.split.map &:to_i
c=gets.split.map &:to_i
max=0
(0..n-1).to_a.combination(2).each do |i|
  sum=0
  sum=(v[i[0]]+v[i[1]])-(c[i[0]]+c[i[1]])
  max=[max,sum].max
end
puts max


N = gets.to_i
V_n = gets.split.map(&:to_i)
C_n = gets.split.map(&:to_i)

ans = 0
[0, 1].repeated_permutation(N).to_a.each do |p|
  v = 0
  c = 0
  p.each.with_index do |i, idx|
    v += V_n[idx] if i == 1
    c += C_n[idx] if i == 1
  end
  ans = [ans, v - c].max
end
p ans


n = gets.chomp.to_i
v = gets.chomp.split(" ").map(&:to_i)
c = gets.chomp.split(" ").map(&:to_i)
ans = -100000000
["1","0"].repeated_permutation (n) do |i|
    cost = 0
    kati = 0
    sa = 0
    i.each_with_index do |item,j|
        if item == "1"
            cost += c[j]
            kati += v[j]
        end
    end
    sa = kati - cost
    ans = [ans,sa].max
end
puts ans


#![allow(unused_imports)]
#![allow(dead_code)]
#![macro_use]
use std::io::prelude::*;
use std::cmp::{max, min};
use std::collections::BinaryHeap;

const MOD: i64 = 1e9 as i64 + 7;

macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        let mut next = || { iter.next().unwrap() };
        input_inner!{next, $($r)*}
    };
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

macro_rules! input_inner {
    ($next:expr) => {};
    ($next:expr, ) => {};

    ($next:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };
}

macro_rules! read_value {
    ($next:expr, ( $($t:tt),* )) => {
        ( $(read_value!($next, $t)),* )
    };

    ($next:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    };

    ($next:expr, chars) => {
        read_value!($next, String).chars().collect::<Vec<char>>()
    };

    ($next:expr, usize1) => {
        read_value!($next, usize) - 1
    };

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}

fn main() {
    input! {
        n: usize,
        v: [i32; n],
        c: [i32; n],
    }
    let ans= v.iter().zip(c.iter()).filter(|&x| x.0 - x.1 > 0).fold(0, |acc, x| acc + x.0 - x.1);
    println!("{}", ans);
}


//! ----------------------------------------------
//! Framework <https://github.com/vain0x/procon>
//!
//! See the bottom of file for solution.
//! ----------------------------------------------

#![allow(unused_imports)]
#![allow(non_snake_case)]

use std::cell::RefCell;
use std::cmp::{max, min, Ordering};
use std::collections::*;
use std::fmt::{Debug, Display, Formatter, Write as FmtWrite};
use std::io::{stderr, stdin, BufRead, Write};
use std::mem::{replace, swap};
use std::ops::*;
use std::rc::Rc;

/// Print values to standard error if debug mode.
#[allow(unused_macros)]
macro_rules! debug {
    ($($e:expr),*) => {
        #[cfg(debug_assertions)]
        $({
            let (e, mut err) = (stringify!($e), stderr());
            writeln!(err, "\x1B[33m{}\x1B[0m = {:?}", e, $e).unwrap()
        })*
    };
}

/// Read from standard input and parse each word.
/// - `read!(T, U, ..)` parses a line as a tuple of words.
/// - `read![[T]]` parses a line as an array of words.
/// - `read![..; N]` parses `N` lines, using `read!(..)` repeatedly.
#[allow(unused_macros)]
macro_rules! read {
    ([$t:ty] ; $n:expr) =>
        ((0..$n).map(|_| read!([$t])).collect::<Vec<_>>());
    ($($t:ty),+ ; $n:expr) =>
        ((0..$n).map(|_| read!($($t),+)).collect::<Vec<_>>());
    ([$t:ty]) =>
        (rl().split_whitespace().map(|w| w.parse().unwrap()).collect::<Vec<$t>>());
    ($($t:ty),*) => {{
        let buf = rl();
        let mut w = buf.split_whitespace();
        ($(w.next().unwrap().parse::<$t>().unwrap()),*)
    }};
}

/// Read a line from standard input.
#[allow(dead_code)]
fn rl() -> String {
    let mut buf = String::new();
    stdin().read_line(&mut buf).unwrap();

    #[allow(deprecated)]
    buf.trim_right().to_owned()
}

// -----------------------------------------------
// Solution
// -----------------------------------------------

fn main() {
    let N = read!(usize);
    let V = read![[i64]];
    let C = read![[i64]];

    let m = (0..N).map(|i| max(V[i] - C[i], 0)).sum::<i64>();

    println!("{}", m)
}


#![allow(dead_code, unused_variables, unused_macros, unused_imports)]

// https://qiita.com/tanakh/items/0ba42c7ca36cd29d0ac8
macro_rules! input { (source = $s:expr, $($r:tt)*) => { let mut iter = $s.split_whitespace(); let mut next = || { iter.next().unwrap() }; input_inner!{next, $($r)*} }; ($($r:tt)*) => { let stdin = std::io::stdin(); let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock())); let mut next = move || -> String{ bytes .by_ref() .map(|r|r.unwrap() as char) .skip_while(|c|c.is_whitespace()) .take_while(|c|!c.is_whitespace()) .collect() }; input_inner!{next, $($r)*} }; }
macro_rules! input_inner { ($next:expr) => {}; ($next:expr, ) => {}; ($next:expr, $var:ident : $t:tt $($r:tt)*) => { let $var = read_value!($next, $t); input_inner!{$next $($r)*} }; ($next:expr, mut $var:ident : $t:tt $($r:tt)*) => { let mut $var = read_value!($next, $t); input_inner!{$next $($r)*} }; }
macro_rules! read_value { ($next:expr, ( $($t:tt),* )) => { ( $(read_value!($next, $t)),* ) }; ($next:expr, [ $t:tt ; $len:expr ]) => { (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>() }; ($next:expr, chars) => { read_value!($next, String).chars().collect::<Vec<char>>() }; ($next:expr, usize1) => { read_value!($next, usize) - 1 }; ($next:expr, $t:ty) => { $next().parse::<$t>().expect("Parse error") }; }

fn main() {
    input! {
        n: i32,
        v: [i32; n],
        c: [i32; n],
    }

    let mut ans = 0;
    for (v, c) in v.iter().zip(c.iter()) {
        if v > c {
            ans += v - c;
        }
    }
    println!("{}", ans);
}


#[allow(unused_macros)]
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        let mut next = || { iter.next().unwrap() };
        input_inner!{next, $($r)*}
    };
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

#[allow(unused_macros)]
macro_rules! input_inner {
    ($next:expr) => {};
    ($next:expr, ) => {};

    ($next:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };
}

#[allow(unused_macros)]
macro_rules! read_value {
    ($next:expr, ( $($t:tt),* )) => {
        ( $(read_value!($next, $t)),* )
    };

    ($next:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    };

    ($next:expr, chars) => {
        read_value!($next, String).chars().collect::<Vec<char>>()
    };

    ($next:expr, usize1) => {
        read_value!($next, usize) - 1
    };

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}

use std::cmp::max;

fn main() {
    input! {
        n: u32,
        v: [i32; n],
        c: [i32; n],
    }

    let mut ans = 0;
    for i in 0..1 << v.len() {
        let mut value = 0;
        let mut cost = 0;
        for j in 0..v.len() {
            if (1 << j) & i != 0 {
                value += v.get(j).unwrap();
                cost += c.get(j).unwrap();
            }
        }
        ans = max(ans, value - cost);
        if ans < value - cost {
            ans = value - cost;
        }
        // println!("value: {}, cost: {}", value, cost);
    }
    println!("{}", ans);
}


use std::io;
use std::cmp;

fn main() {
    let n = read_one::<usize>();
    let vn = read::<isize>();
    let cn = read::<isize>();
    let mut ans = 0;
    for i in 0..1 << n {
        let mut sum: isize = 0;
        for j in 0..1 << (n + 1) {
            if i & (1 << j) != 0 { sum += vn[j] - cn[j]; }
        }
        ans = cmp::max(ans, sum);
    }
    println!("{}", ans);
}

#[allow(dead_code)]
fn read<T>() -> Vec<T>
where T:
std::str::FromStr,
T::Err: std::fmt::Debug {

    let mut buf = String::new();
    io::stdin().read_line(&mut buf).unwrap();
    buf.split_whitespace()
        .map(|s| s.trim().parse().unwrap())
        .collect()
}

#[allow(dead_code)]
fn read_one<T>() -> T
where T:
std::str::FromStr,
T::Err: std::fmt::Debug {

    let mut buf = String::new();
    io::stdin().read_line(&mut buf).unwrap();
    buf.trim().parse().unwrap()
}


fn read<T: std::str::FromStr>() -> T {
  let mut s = String::new();
  std::io::stdin().read_line(&mut s).ok();
  s.trim().parse().ok().unwrap()
}

fn read_vec<T: std::str::FromStr>() -> Vec<T> {
  let mut s = String::new();
  std::io::stdin().read_line(&mut s).ok();
  s.trim().split_whitespace()
    .map(|e| e.parse().ok().unwrap()).collect()
}

fn main() {
  let _: String = read();
  let vs: Vec<i32> = read_vec();
  let cs: Vec<i32> = read_vec();

  let mut p: Vec<i32> = vs.iter().zip(cs.iter())
    .map(|(x, y)| x - y)
    .collect();
  p.sort();
  p.reverse();

  let ans = if p[0] < 0 {
    0
  } else if p.len() <= 1 || p[1] <= 0 {
    p[0]
  } else {
    p[0] + p[1]
  };

  println!("{}", ans);
}


extension String: CollectionType {}

let a:Int = Int(readLine()!)!
let b: [Int] = readLine()!.split(" ").map { Int($0)! }
let c: [Int] = readLine()!.split(" ").map { Int($0)! }

var d: [Int] = []
for var i = 0; i < a; i += 1 {
  d.append( b[i] - c[i] )
}

var o = 0
for var i = 0; i < a; i += 1 {
  if( d[i] > 0 ) {
  	o += d[i]
  }
}
print(o)


import Foundation

#if swift(>=4.0)
extension String {
    func split(by separator: String) -> [String] {
        return self.components(separatedBy: separator)
    }
    func toArray() -> [String] {
        return self.map{String($0)}
    }
}
func exponentiate(_ lhs: Int, _ rhs: Int) -> Int {
    return (0..<rhs).reduce(1){i,_ in i*lhs}
}
#else
extension String {
    func split(by separator: String) -> [String] {
        return self.componentsSeparatedByString(separator)
    }
    var count: Int {
        return self.characters.count
    }
    func toArray() -> [String] {
        return self.characters.map{String($0)}
    }
    func uppercased() -> String {
        return self.uppercaseString
    }
    func lowercased() -> String {
        return self.lowercaseString
    }
}
//extension Array where Element == String {
//    func joined(separator separator: String) -> String {
//        return self.joinWithSeparator(separator)
//    }
//}
extension Array where Element: Comparable {
    func max() -> Element {
        return self.maxElement()!
    }
    func min() -> Element {
        return self.minElement()!
    }
    func sorted() -> Array {
        return self.sort()
    }
    func reversed() -> Array {
        return self.reverse()
    }
    mutating func sort() {
        self.sortInPlace()
    }
}
extension Array {
    init(repeating: Element, count: Int) {
        self.init(count: count, repeatedValue: repeating)
    }
}
func stride<T: Strideable>(from start: T, to end: T, by stride: T.Stride) -> StrideTo<T> {
    return start.stride(to: end, by: stride)
}
func exponentiate(lhs: Int, _ rhs: Int) -> Int {
    return (0..<rhs).reduce(1){i,_ in i*lhs}
}
#endif
func readInt() -> Int? {
    return Int(readLine()!)
}
func readStringSplit(by separator: String) -> [String] {
    return readLine()!.split(by: separator)
}
func readIntSplit(by separator: String) -> [Int] {
    return readLine()!.split(by: separator).map{Int($0)!}
}

/*************** テストスペース ***************/

/*************** メインプログラム ***************/

let N = readInt()!
let V = readIntSplit(by: " ")
let C = readIntSplit(by: " ")
var ans = 0
for i in 0..<N {
    ans += max(V[i]-C[i], 0)
}
print(ans)


let N = Int(readLine()!)!
let V = readLine()!.characters.split(" ").map{Int(String($0))!}
let C = readLine()!.characters.split(" ").map{Int(String($0))!}
print((0..<N).reduce(0){max(V[$1.0]-C[$1.0],0)})


let N = readInt()!
let V = readLine()!.characters.split(" ").map{Int(String($0))!}
let C = readLine()!.characters.split(" ").map{Int(String($0))!}
print((0..<N).reduce(0){max(V[$1.0]-C[$1.0],0)})


let N = readInt()!
let V = readIntSplit(by: " ")
let C = readIntSplit(by: " ")
print((0..<N).reduce(0){max(V[$1.0]-C[$1.0],0)})


import { readFileSync } from "fs";

function B(count: number, values: number[], costs: number[]) {
    const diff: number[] = [];
    for (let i = 0; i < count; i++) {
        diff.push(values[i] - costs[i]);
    }
    return diff
        .filter(v => {
            return v > 0;
        })
        .reduce((r, c) => {
            return r + c;
        }, 0);
}

const inputB = readFileSync("/dev/stdin", "utf8");
const changeInputB = inputB.split(/\r?\n/).map((v, i) => {
    if (i == 0) return Number(v);
    return v.split(" ").map(Number);
});
console.log(B(changeInputB[0] as number, changeInputB[1] as number[], changeInputB[2] as number[])


const stdin = require('fs').readFileSync('/dev/stdin', 'utf8')

const _n = stdin.split('\n')[0]
const n = Number(_n)

const v = stdin
  .split('\n')[1]
  .split(' ')
  .map(Number)
const c = stdin
  .split('\n')[2]
  .split(' ')
  .map(Number)

let x = 0
let y = 0
const diff = v.map((e, i) => {
  if (e - c[i] > 0) {
    x += e
    y += c[i]
  }
  return e - c[i]
})

const res = x - y

console.log(res)


"use strict";

class Main {
  public static main(input: string[]): void {

        let result = 0;
    const value = input[1].split(/\s/).map(Number);
    const cost = input[2].split(/\s/).map(Number);
    const length = value.length;
    for (let i = 0; i < length; i++) {
      let benefit = value[i] - cost[i];
      if (benefit > 0) {
        result += benefit;
      }
    }

    console.log(result);
  }
}

Main.main(
  require("fs")
    .readFileSync("/dev/stdin", "utf8")
    .split(/\n/)
);


((input: string): void => {
    const [_, v, c]: number[][] = input.trim().split(/\n/).map(
        v => v.split(" ").map(Number)
    );
    const hoge = v.map( (v, i) => v - c[i] ).filter(v => v > 0)
    console.log(hoge.reduce( (a, b) => a+b ));
})(require('fs').readFileSync('/dev/stdin', 'utf8'));


const main = (input: string) => {
  const lines = input.trim().split("\n").slice(1)
  const V = lines[0].split(" ").map(str => parseInt(str))
  const C = lines[1].split(" ").map(str => parseInt(str))
  const N = V.length;
  let sumOfV = V.reduce((a, x) => a += x, 0)
  let sumOfC = C.reduce((a, x) => a += x, 0)
  let X: number[] = [];
  let Y: number[] = [];
  let result: number[] = [];
  let answer;

  for (let i = 0; i < N; i++) {
    X.push(V[i])
    Y.push(C[i])
    for (let j = i + 1; j < N; j++) {
      X.push(V[i] + V[j])
      Y.push(C[i] + C[j])
    }
  }
  X.push(sumOfV);
  Y.push(sumOfC);

  for (let i = 0; i < X.length; i++) {
    result.push(X[i] - Y[i])
  }

  resultMax = Math.max.apply(null, result);
  answer = resultMax > 0 ? resultMax : 0

  console.log(answer);
}

main(require("fs").readFileSync("/dev/stdin", "utf8"));


const main = (input: string) => {
  const lines = input.trim().split("\n").slice(1)
  const V = lines[0].split(" ").map(str => parseInt(str))
  const C = lines[1].split(" ").map(str => parseInt(str))
  const N = V.length;
  let sumOfV = V.reduce((a, x) => a += x, 0)
  let sumOfC = C.reduce((a, x) => a += x, 0)
  let X: number[] = [];
  let Y: number[] = [];
  let result: number[] = [];
  let answer;

  for (let i = 0; i < N; i++) {
    X.push(V[i])
    Y.push(C[i])
    for (let j = i + 1; j < N; j++) {
      X.push(V[i] + V[j])
      Y.push(C[i] + C[j])
    }
  }
  X.push(sumOfV);
  Y.push(sumOfC);

  for (let i = 0; i < X.length; i++) {
    result.push(X[i] - Y[i])
  }

  answer = Math.max.apply(null, result) >= 0 ? result : 0

  console.log(answer);
}

main(require("fs").readFileSync("/dev/stdin", "utf8"));


K = input()

if K == 'ABC':
    print('ARC')
else:
    print('ABC')


s = input()

if (s == 'ABC'):
    print('ARC')
else:
    print('ABC')


S = input()

if 'B' in S:
    print('ARC')
else:
    print('ABC')


s = input()

if s == "ABC" :
  print("ARC")

else :
  print("ARC")


S = input()
print("ARC") if S=="ABC" else print("ARC")


s = input()
print("ABC" if s == "ARC" else "ABC")


import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.lang.reflect.ParameterizedType;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.NoSuchElementException;
import java.util.function.BiFunction;
import java.util.function.Consumer;
import java.util.function.Supplier;

class GenericClass<T> {
    private final Class<T> type;
    public GenericClass() {
        ParameterizedType superClass = (ParameterizedType) getClass().getGenericSuperclass();
        Class<T> type = (Class<T>) superClass.getActualTypeArguments()[0];
        System.out.println(type);
        this.type = type;
    }

    public Class<T> getMyType() {
        return this.type;
    }
}

class FastScanner {
    private final InputStream in = System.in;
    private final byte[] buffer = new byte[1024];
    private int ptr = 0;
    private int buflen = 0;

    private boolean hasNextByte() {
        if (ptr < buflen) {
            return true;
        } else {
            ptr = 0;
            try {
                buflen = in.read(buffer);
            } catch (IOException e) {
                e.printStackTrace();
            }
            if (buflen <= 0) {
                return false;
            }
        }
        return true;
    }

    private int readByte() {
        if (hasNextByte()) return buffer[ptr++];
        else return -1;
    }

    private boolean isPrintableChar(int c) {
        return 33 <= c && c <= 126;
    }

    public boolean hasNext() {
        while (hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++;
        return hasNextByte();
    }

    public String next() {
        if (!hasNext()) throw new NoSuchElementException();
        StringBuilder sb = new StringBuilder();
        int b = readByte();
        while (isPrintableChar(b)) {
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }

    public long nextLong() {
        if (!hasNext()) throw new NoSuchElementException();
        long n = 0;
        boolean minus = false;
        int b = readByte();
        if (b == '-') {
            minus = true;
            b = readByte();
        }
        if (b < '0' || '9' < b) {
            throw new NumberFormatException();
        }
        while (true) {
            if ('0' <= b && b <= '9') {
                n *= 10;
                n += b - '0';
            } else if (b == -1 || !isPrintableChar(b)) {
                return minus ? -n : n;
            } else {
                throw new NumberFormatException();
            }
            b = readByte();
        }
    }

    public int nextInt() {
        long nl = nextLong();
        if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();
        return (int) nl;
    }

    public double nextDouble() {
        return Double.parseDouble(next());
    }
}

public class Main {
    final static long MOD07 = 1_000_000_007;
    final static long MOD09 = 1_000_000_009;

    public static void main(String[] args) {
        final FastScanner fs = new FastScanner();
        String S = fs.next();

        PrintWriter out = new PrintWriter(System.out);

        if (S.equals("ABC")) {
            out.println("ARC");
        } else {
            out.println("ABC");
        }

        out.flush();
    }

    static void debug(Object... os) {
        System.err.println(Arrays.deepToString(os));
    }

    // Execute func for all patterns can be represented with n bit.
    // O(n2^n)
    static void forAllBit(int n, Consumer<List<Boolean>> func) {
        for (int i = 0; i < (1 << n); i++) {
            List<Boolean> arg = new ArrayList();
            for (int j = 0; j < n; j++) {
                boolean isJthBitSet = ((i >> j) & 1) == 1;
                arg.add(isJthBitSet);
            }
            func.accept(arg);
        }
    }

    private static boolean nextPermutation(int[] arr) {
        // Find the start index of descending part.
        int descendingStart = -1;

        int previous = Integer.MIN_VALUE;
        for (int i = arr.length-1; i>=0; i--) {
            if (arr[i] >= previous ) {
                descendingStart = i;
            } else {
                break;
            }
            previous = arr[i];
        }

        if (descendingStart == 0) {
            return false;
        }

        int target = arr[descendingStart - 1];
        int swapIndex = descendingStart;
        for (int i = descendingStart; i < arr.length;i++) {
            if (arr[i] > target) {
                swapIndex = i;
            }
        }

        swap(arr, descendingStart - 1, swapIndex);
        reverse(arr, descendingStart, arr.length -1);
        return true;
    }

    private static void reverse(int[] arr, int from, int to) {
        while (from < to) {
            swap(arr, from, to);
            from++;
            to--;
        }
    }

    private static void swap(int[] arr, int i, int j) {
        int tmp = arr[i];
        arr[i] = arr[j];
        arr[j] = tmp;
    }

    static class Pair<F extends Comparable<F>, S extends Comparable<S>> implements Comparable<Pair<F, S>> {
        F f;
        S s;

        Pair() {
        }

        Pair(F f, S s) {
            this.f = f;
            this.s = s;
        }

        Pair(Pair<F, S> p) {
            f = p.f;
            s = p.s;
        }

        @Override
        public int compareTo(Pair<F, S> p) {
            if (f.compareTo(p.f) != 0) {
                return f.compareTo(p.f);
            }
            return s.compareTo(p.s);
        }

        @Override
        public int hashCode() {
            return f.hashCode() ^ s.hashCode();
        }

        @Override
        public boolean equals(Object o) {
            if (this == o) {
                return true;
            }
            if (o == null || this.f == null || this.s == null) {
                return false;
            }
            if (this.getClass() != o.getClass()) {
                return false;
            }
            Pair p = (Pair) o;
            return this.f.equals(p.f) && this.s.equals(p.s);
        }

        @Override
        public String toString() {
            return "{" + f.toString() + ", " + s.toString() + "}";
        }
    }

    public static int gcd(int a, int b) {
        if (b == 0) {
            return a;
        }
        return gcd(b, a % b);
    }

    public static boolean isPrime(int n) {
        for (int i = 2; i <= ((int) Math.sqrt(n)); i++) {
            if (n % i == 0) {
                return false;
            }
        }
        return n != 1;
    }

    public static void reverse(int[] array) {
        for (int i = 0; i < array.length / 2; i++) {
            int temp = array[i];
            array[i] = array[array.length - i - 1];
            array[array.length - i - 1] = temp;
        }
    }

    public static void reverse(long[] array) {
        for (int i = 0; i < array.length / 2; i++) {
            long temp = array[i];
            array[i] = array[array.length - i - 1];
            array[array.length - i - 1] = temp;
        }
    }

    public static boolean isPrime(long n) {
        for (long i = 2; i <= ((long) Math.sqrt(n)); i++) {
            if (n % i == 0) {
                return false;
            }
        }
        return n != 1;
    }

    public static Map<Long, Long> primeFactor(long n) {
        Map<Long, Long> map = new HashMap<>();
        long num = n;
        for (long i = 2; i <= ((long) Math.sqrt(n)); i++) {
            while (num % i == 0L) {
                map.put(i, map.getOrDefault(i, 0L) + 1L);
                num /= i;
            }
        }
        if (num != 1) {
            map.put(num, 1L);
        }

        return map;
    }

    public static List<Long> divisors(long n) {
        List<Long> list = new ArrayList<>();
        for (long i = 1; i <= ((long) Math.sqrt(n)); i++) {
            if (n % i == 0) {
                list.add(i);
                if (i != n / i) {
                    list.add(n / i);
                }
            }
        }

        return list;
    }

    public static int lcm(int a, int b) {
        return a / gcd(a, b) * b;
    }

    public static int nCk(int n, int k, int M) {
        long ret = 1;
        int min = Math.min(k, n - k);
        for (int i = 1; i <= min; i++) {
            ret = (ret * pow(i, M - 2, M)) % M;
        }
        for (int i = n - min + 1; i <= n; i++) {
            ret = (ret * i) % M;
        }
        return (int) ret;
    }

    //return a^b mod M O(logB)
    public static long pow(long a, long b, int M) {
        long ret = 1;
        long tmp = a;
        while (b > 0) {
            if ((b & 1) == 1) ret = (ret * tmp) % M;
            tmp = (tmp * tmp) % M;
            b = b >> 1;
        }
        return ret;
    }

    public static int find(int[] tree, int idx) {
        if (tree[idx] == idx) return idx;
        else return tree[idx] = find(tree, tree[idx]);
    }

    public static void union(int[] tree, int idx1, int idx2) {
        int root1 = find(tree, idx1);
        int root2 = find(tree, idx2);
        tree[root2] = root1;
    }

    public static int lowerBound(int[] list, int target) {
        int ok = list.length;
        int ng = -1;
        while (Math.abs(ok - ng) > 1) {
            int mid = (ok + ng) / 2;
            if (list[mid] >= target) {
                ok = mid;
            } else {
                ng = mid;
            }
        }
        return ok;
    }

    public static int lowerBound(long[] list, long target) {
        int ok = list.length;
        int ng = -1;
        while (Math.abs(ok - ng) > 1) {
            int mid = (ok + ng) / 2;
            if (list[mid] >= target) {
                ok = mid;
            } else {
                ng = mid;
            }
        }
        return ok;
    }

    public static <T extends Comparable<? super T>> int lowerBound(List<T> list, T target) {
        return ~Collections.binarySearch(list, target, (x, y) -> (x.compareTo(y) >= 0) ? 1 : -1);
    }

    public static <T extends Comparable<? super T>> int upperBound(List<T> list, T target) {
        return ~Collections.binarySearch(list, target, (x, y) -> (x.compareTo(y) > 0) ? 1 : -1);
    }
}

class BIT<T> {
    int n;
    ArrayList<T> bit;
    BiFunction<T, T, T> bif;

    /**
     * 1-indexed なBinary Indexed Treeを構築する
     *
     * @param n   容量
     * @param bif 適用させる関数
     * @param sup 初期値
     */
    BIT(int n, BiFunction<T, T, T> bif, Supplier<T> sup) {
        this.n = n;
        bit = new ArrayList<>(n + 1);
        for (int i = 0; i < n + 1; ++i) {
            bit.add(sup.get());
        }
        this.bif = bif;
    }

    /**
     * iの位置の値をvで更新する
     *
     * @param i index
     * @param v 新しい値
     */
    void set(int i, T v) {
        for (int x = i; x <= n; x += x & -x) {
            bit.set(x, bif.apply(bit.get(x), v));
        }
    }

    /**
     * クエリー
     *
     * @param defaultValue 初期値
     * @param i            index
     * @return [1, i]までfを適用した結果
     */
    T reduce(T defaultValue, int i) {
        T ret = defaultValue;
        for (int x = i; x > 0; x -= x & -x) {
            ret = bif.apply(ret, bit.get(x));
        }
        return ret;
    }
}

class SegmentTree<T> {
    int n;
    ArrayList<T> dat;
    BiFunction<T, T, T> bif;
    Supplier<T> sup;

    /**
     * 0-indexed なSegment Treeを構築する
     *
     * @param n_  要求容量
     * @param bif 適用させる関数
     * @param sup 初期値
     */
    SegmentTree(int n_, BiFunction<T, T, T> bif, Supplier<T> sup) {
        n = 1;
        while (n < n_) n *= 2;

        dat = new ArrayList<>(2 * n - 1);
        for (int i = 0; i < 2 * n - 1; ++i) {
            dat.add(sup.get());
        }
        this.bif = bif;
        this.sup = sup;
    }

    /**
     * kの位置の値をvで更新する
     *
     * @param k index
     * @param v 新しい値
     */
    void set(int k, T v) {
        k += n - 1;
        dat.set(k, v);
        while (k > 0) {
            k = (k - 1) / 2;
            dat.set(k, bif.apply(dat.get(k * 2 + 1), dat.get(k * 2 + 2)));
        }
    }

    /**
     * クエリー
     *
     * @param l はじめ
     * @param r おわり
     * @return [l, r)での演算bifを適用した結果を返す
     */
    T reduce(int l, int r) {
        return _reduce(l, r, 0, 0, n);
    }

    T _reduce(int a, int b, int k, int l, int r) {
        if (r <= a || b <= l) return sup.get();
        if (a <= l && r <= b) return dat.get(k);
        T vl = _reduce(a, b, k * 2 + 1, l, (l + r) / 2);
        T vr = _reduce(a, b, k * 2 + 2, (l + r) / 2, r);
        return bif.apply(vl, vr);
    }
}

class UnionFind {
    int[] par;

    UnionFind(int n) {
        par = new int[n];
        for (int i = 0; i < n; ++i) {
            par[i] = i;
        }
    }

    int find(int x) {
        if (par[x] == x) {
            return x;
        }
        return par[x] = find(par[x]);
    }

    boolean same(int x, int y) {
        return find(x) == find(y);
    }

    void union(int x, int y) {
        x = find(x);
        y = find(y);
        if (x == y) {
            return;
        }
        par[x] = y;
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.Date;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Queue;
import java.util.StringTokenizer;
import java.util.TreeSet;

import javax.swing.*;

import static java.util.Arrays.binarySearch;
import static java.util.Arrays.copyOfRange;
import static java.util.Arrays.sort;

public class Main {

    public static void main(String[] args) throws Exception {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;

        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);

        Task solver = new Task();
        solver.solve(1, in, out);
        out.close();
    }
}

class Task {

    private static int mod = 998244353;

    public void solve(int testNumber, InputReader in, PrintWriter out) {
        String s = in.next();
        if (s.equals("ABC")) {
            out.println("ARC");
        } else {
            out.println("ABC");
        }
    }

}

class InputReader {

    private final BufferedReader reader;
    private StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream));
        tokenizer = null;
    }

    public String nextLine() {
        try {
            return reader.readLine();
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            tokenizer = new StringTokenizer(nextLine());
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

    public long nextLong() {
        return Long.parseLong(next());
    }

    public double nextDouble() {
        return Double.parseDouble(next());
    }

}


import java.io.IOException;
import java.io.InputStream;
import java.util.NoSuchElementException;

class FastScanner {
    private final InputStream in = System.in;
    private final byte[] buffer = new byte[1024];
    private int ptr = 0;
    private int buflen = 0;
    private boolean hasNextByte() {
        if (ptr < buflen) {
            return true;
        }else{
            ptr = 0;
            try {
                buflen = in.read(buffer);
            } catch (IOException e) {
                e.printStackTrace();
            }
            if (buflen <= 0) {
                return false;
            }
        }
        return true;
    }
    private int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1;}
    private static boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}
    public boolean hasNext() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++; return hasNextByte();}
    public String next() {
        if (!hasNext()) throw new NoSuchElementException();
        StringBuilder sb = new StringBuilder();
        int b = readByte();
        while(isPrintableChar(b)) {
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }
    public long nextLong() {
        if (!hasNext()) throw new NoSuchElementException();
        long n = 0;
        boolean minus = false;
        int b = readByte();
        if (b == '-') {
            minus = true;
            b = readByte();
        }
        if (b < '0' || '9' < b) {
            throw new NumberFormatException();
        }
        while(true){
            if ('0' <= b && b <= '9') {
                n *= 10;
                n += b - '0';
            }else if(b == -1 || !isPrintableChar(b)){
                return minus ? -n : n;
            }else{
                throw new NumberFormatException();
            }
            b = readByte();
        }
    }
    public int nextInt() {
        long nl = nextLong();
        if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();
        return (int) nl;
    }
    public double nextDouble() { return Double.parseDouble(next());}
}

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		FastScanner fs = new FastScanner();
		String S = fs.next();
		if(S.equals("ABC")) System.out.println("ARC");
		else System.out.println("ABC");
	}

}


import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String input = in.nextLine();
        String s = "ABC" , t = "ARC";

        if (input == s) {
            System.out.println("ARC");
        } else {
            System.out.println("ABC");
        }
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.PrintWriter;

public class Main {

    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(System.out);

        String S = br.readLine();

        if(S.equals("ABC"))) {
            pw.println("ARC");
        } else {
            pw.println("ABC");
        }

        br.close();
        pw.close();
    }
}


public class Main {
  public static void main(String[] args) {
    String S = new java.util.Scanner(System.in).nextText();
    switch (S) {
      case "ABC":
       System.out.println("ARC");
       break;
      case "ARC":
       System.out.println("ABC");
       break;
    }
  }
}


#include<stdio.h>
int main(){
	int i;
    char a, b, c;
    scanf("%c%c%c", &a, &b, &c);
	if(a == 'A' && b == 'B' && c == 'C'){
	    printf("ARC");
   	}
	else if(a == 'A' && b == 'R' && c == 'C') {
	    printf("ABC");
    }
	return 0;
}


#include <stdio.h>
char a[5];
int main(){
    scanf("%s", a);
    if(a[1] == 'B' ) printf("ARC\n");
    else if(a[1] == 'R') printf("ABC\n");
    return 0;
}


#pragma GCC optimize("Ofast")
#include<stdio.h>
#include<algorithm>
using namespace std;
char str[5];
int main(){
	scanf(" %s",str);
	if(str[1]=='B')
		str[1]='R';
	else
		str[1]='B';
	puts(str);
}


#include <iostream>
#include <string>
using namespace std;

int main(){
  string s;
  if(s=="ABC"){
    cout << "ARC";
  }
  else{
    cout << "ABC";
  }
}


#include <iostream>
#include <string>
using namespace std;

int main(){
  string N;
  cin >> N;
  if(N = "ABC"){
    cout << "ARC";
  }
  else{
    cout << "ABC";
  }
}


#include <bits/stdc++.h>
using namespace std;
string S;
int main() {
cin >>S;
if (S =="ABC"){
   cout <<"ARC"<<endl;
}
if (S == "ARC"){
   cout << "ABC" << endl;
}
}


#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>

int main(void){
char s[10];scanf("%s",s);

if(strcmp(s,"ABC")==0){printf("ARC");}
else{printf("ABC\n");}

}


#include <stdio.h>

int main(void){
	char c[4];
  	scanf("%s",c);
  	if(c[1]=='B'){
    	printf("ARC\n");
    }else{
    	printf("ABC\n");
    }
}


#include <stdio.h>
#include<string.h>

int main()
{

  char s[4];

  scanf("%s",s);

  if(strcmp(s,"ABC")==0)
  {
    printf("ARC\n");
  }
  else
  {
    printf("ABC\n");
  }
  return 0;
}


#include <stdio.h>
#include <string.h>
int main(void)
{
	char S[3],B[] = "ABC",R[] = "ARC";
	scanf("%s",S);
	if(strcmp(S,B) == 0){
		printf("ARC");
	}else{
		printf("ABC");
	}
	return 0;
}


#include <stdio.h>
#include <string.h>
int main(void)
{
	char S[3],B[] = "ABC",R[] = "ARC";
	scanf("%s",S);
	if(strcmp(S,B) == 0){
		printf("ARC");
	}else if(strcmp(S,R) == 0){
		printf("ABC");
	}
	return 0;
}


#include <stdio.h>
#include <string.h>
int main(void)
{
	char S[3],B[] = ABC,R[] = ARC;
	scanf("%s",S);
	if(strcmp(S,B) == 0){
		printf("ARC");
	}else if(strcmp(S,R) == 0){
		printf("ABC");
	}
	return 0;
}


function Main(input) {
    tmp = input.split("\n");
    s = tmp[0];

    if (s === "ABC") {
        console.log("ARC");

    } else if(s === "ARC"){
        console.log("ABC");
    }

}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));


function Main(input){
  input = input.split("");
  let ans = "ARC";
  if(input[1] === "R"){
    ans = "ABC" ;
  }
  console.log(ans);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));


function Main(input) {
    // 1行目がinput[0], 2行目がinput[1], …に入る
    input = input.trim();
    var N = input;
    if (N == 'ABC') {
        console.log('ARC');

    } else {
        console.log('ABC');

    }
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));


function Main(input) {

  console.log(input === 'ABC' ? 'ARC' : 'ABC');

}

// デバッグ用
function debug() {
  var input = document.getElementById("input").value;
  Main(input);
}

//* この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
Main(require("fs").readFileSync("/dev/stdin", "utf8"));


function Main(input){
    input=input.split("\n");  //ここまで必須
    if (input=="ABC"){console.log("ARC")} else{console.log("ABC")}
}
Main(require("fs").readFileSync("/dev/stdin","utf8"));


function Main(input) {
    input = input.split("\n");
    const str = input[0];

    let message = '';

if (str == 'ARC') {
    message = 'ABC';
} else if (str == 'ABC') {
    message = 'ARC';
}

    console.log(message);
}


package main

import (
	"fmt"
)

func main() {
	var s string
	fmt.Scan(&s)

	if s == "ABC" {
		fmt.Println("ARC")
	} else {
		fmt.Println("ABC")
	}
}


package main

import "fmt"

func main() {
	var s, contest string
	fmt.Scan(&s)
	if s == "ABC" {
		contest = "ARC"
	} else if s == "ARC" {
		contest = "ABC"
	}
	fmt.Printf("%s", contest)
}


package main

import "fmt"

func main() {
	var lastContest string
	fmt.Scan(&lastContest)

	if lastContest == "ABC" {
		fmt.Println("ARC")
	} else {
		fmt.Println("ABC")
	}
}


package main

import "fmt"

func main() {
	var s string
	fmt.Sprintf("%s", &s)
	if s == "ABC" {
		fmt.Println("ARC")
	} else {
		fmt.Println("ABC")
	}
}


package main

import "fmt"

func main() {
	var s string
	fmt.Sprintf("%s", &s)
	if s == "ABC" {
		fmt.Print("ARC")
	} else {
		fmt.Print("ABC")
	}
}


package main

import (
	"fmt"
)

func main() {
	var s string
	fmt.Scan(&s)
	fmt.Println(s)
}


contest = gets.chomp!
if contest.eql?("ABC")
	puts "ARC"
else
  puts "ABC"
end


puts gets.chomp=="ABC"?"ARC":"ABC"


if readline.chomp == "ARC"
  puts "ABC"
else
  puts "ARC"
end


s=gets.chomp
if s==


S = gets.to_s
if S == "ABC"
  puts "ARC"
else
  puts "ABC"
end


s=gets.chomp
if s=="ABC"
  p "ARC"
else
  p "ABC"
end


use proconio::{fastout, input};

#[fastout]
fn main() {
    input! {
        s: String,
    }

    let ans = if s == "ABC" { "ARC" } else { "ABC" };

    println!("{}", ans);
}


fn main() {
    let (r, w) = (std::io::stdin(), std::io::stdout());
    let mut sc = IO::new(r.lock(), w.lock());

    let s: String = sc.read();
    let ans = if s == "ABC" { "ARC" } else { "ABC" };
    println!["{}", ans];
}

pub struct IO<R, W: std::io::Write>(R, std::io::BufWriter<W>);

impl<R: std::io::Read, W: std::io::Write> IO<R, W> {
    pub fn new(r: R, w: W) -> IO<R, W> {
        IO(r, std::io::BufWriter::new(w))
    }
    pub fn write<S: ToString>(&mut self, s: S) {
        use std::io::Write;
        self.1.write(s.to_string().as_bytes()).unwrap();
    }
    pub fn read<T: std::str::FromStr>(&mut self) -> T {
        use std::io::Read;
        let buf = self
            .0
            .by_ref()
            .bytes()
            .map(|b| b.unwrap())
            .skip_while(|&b| b == b' ' || b == b'\n' || b == b'\r' || b == b'\t')
            .take_while(|&b| b != b' ' && b != b'\n' && b != b'\r' && b != b'\t')
            .collect::<Vec<_>>();
        unsafe { std::str::from_utf8_unchecked(&buf) }
            .parse()
            .ok()
            .expect("Parse error.")
    }
    pub fn vec<T: std::str::FromStr>(&mut self, n: usize) -> Vec<T> {
        (0..n).map(|_| self.read()).collect()
    }
    pub fn chars(&mut self) -> Vec<char> {
        self.read::<String>().chars().collect()
    }
}


macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        let mut next = || { iter.next().unwrap() };
        input_inner!{next, $($r)*}
    };
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

macro_rules! input_inner {
    ($next:expr) => {};
    ($next:expr, ) => {};

    ($next:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };
}

macro_rules! read_value {
    ($next:expr, ( $($t:tt),* )) => {
        ( $(read_value!($next, $t)),* )
    };

    ($next:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    };

    ($next:expr, chars) => {
        read_value!($next, String).chars().collect::<Vec<char>>()
    };

    ($next:expr, usize1) => {
        read_value!($next, usize) - 1
    };

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}

fn main(){

    input!{
        s: chars,
    }

    let ss: String = s.into_iter().collect();

    if ss=="ARC" {
        println!("ABC");
    } else if ss=="ABC" {
        println!("ARC");
    } else {
        return;
    }

    return;
}


fn main() {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).unwrap();
    if s == "ABC" {
        println!("ARC");
    } else {
        println!("ABC");
    }
}


use std::io::{stdin, Read};

fn main() {
    let mut buffer = String::new();
    let mut stdin = stdin();

    stdin.read_to_string(&mut buffer).unwrap();
    match &*buffer {
        "ABC" => println!("ARC"),
        "ARC" => println!("ABC"),
        _ => println!(""),
    }
}


use competitive::prelude::*;

fn main() {
  input!{
    S: String,
  }
  println!("{}", if &*S=="ABC" { "ARC" } else {"ABC"} )
}


func main() {
    let input = readLine()!
    if input == "ARC" {
        print("ABC")
    } else {
        print("ARC")
    }
}

main()


let s = readLine()!

if s == "ABC" {
  print("ARC")
} else {
  print("ABC")
}


print(readLine()! == "ARC" ? "ABC" : "ARC")


import Foundation
let input_line: String = readLine()!
let split: [String] = input_line.components(separatedBy: " ") //ブランクで区切られている場合

let S = readLine()!

if S == "ABC" {
    print("ARC")
} else {
    print("ABC")
}


import Foundation
let input_line: String = readLine()!
let split: [String] = input_line.components(separatedBy: " ") //ブランクで区切られている場合

let String = "S"
if ("S"=="ABC"){
    print("ARC")
}else if ("S"=="ARC"){
    print("ABC")
}


import Foundation
let input_line: String = readLine()!
let split: [String] = input_line.components(separatedBy: " ") //ブランクで区切られている場合

var String = "S"
if ("S"=="ABC"){
    print("ARC")
}else if ("S"=="ARC"){
    print("ABC")
}


import * as fs from "fs";

const input:string = fs.readFileSync("/dev/stdin", "utf8").trim();
const result: string = input === 'ABC' ? 'ARC' : 'ABC';
console.log(result);


"use strict";
const Main = (input) =>{
   let xs = input.trim().split(' ');
   if(xs[0]=='ARC'){
     console.log('ABC');
   }else{
     console.log('ARC');
   }
}
Main(require('fs').readFileSync('/dev/stdin','utf8'));


import * as fs from 'fs'
import {debug} from '../../../util'

const input = fs.readFileSync('/dev/stdin', 'utf8').trim()
const output = (x: any) => console.log(x)
// debug(input)
const S = input
S === 'ABC' ? output('ARC') : output('ABC')


import * as fs from 'fs';

// main
function main(input: string[]) {
    // param
    var s: string = "";
    var ans: string = "";
    // init
    s = input.shift();
    // solve
    ans = (s = "ABC") ? "ARC": "ABC";
    // answer
    console.log(ans);
}

// graph lib
/*
function GRAPH_enumPattern(cur: number[], pat: number[][]): number[][] {
    var arr = [];
    for (var patx = 0; patx < pat.length; patx++) {
        var pos = [cur[0] + pat[patx][0], cur[1] + pat[patx][1]];
        arr.push(pos);
    }
    return arr;
}
*/

// math lib
/*
function Math_max(arr: number[]): number { return arr.reduce((x, y) => Math.max(x, y)); }
function Math_min(arr: number[]): number { return arr.reduce((x, y) => Math.min(x, y)); }
function Math_gcd(): number {
    var ans = arguments[0];
    var f = (a: number, b: number): number => b ? f(b, a % b) : a
    for (var i = 1; i < arguments.length; i++) {
        ans = f(ans, arguments[i]);
    }
    return ans
};
function Math_gcdArray(values: number[]): number {
    var ans = values[0];
    var f = (a: number, b: number): number => b ? f(b, a % b) : a
    for (var i = 1; i < values.length; i++) {
        ans = f(ans, values[i]);
    }
    return ans
};
function Math_lcm(): number {
    var a = arguments
    var g = (n: number, m: number): number => m ? g(m, n % m) : n
    var l = (n: number, m: number): number => n * m / g(n, m)
    var ans = a[0]
    for (var i = 1; i < a.length; i++) {
        ans = l(ans, a[i])
    }
    return ans
}
function Math_lcmArray(values: number[]): number {
    var a = values
    var g = (n: number, m: number): number => m ? g(m, n % m) : n
    var l = (n: number, m: number): number => n * m / g(n, m)
    var ans = a[0]
    for (var i = 1; i < a.length; i++) {
        ans = l(ans, a[i])
    }
    return ans
}
function Math_primeList(value: number): number[] {
    var ans = [];
    var arr = new Array(value).fill(0);
    for (var i = 2; i < value; i++) {
        if (arr[i] == 0) {
            for (var j = i; j < value; j += i) {
                if (arr[j] == 0) arr[j] = i;
            }
        }
    }
    for (var i = 2; i < value; i++) {
        if (arr[i] == i) ans.push(i);
    }
    return ans;
}
function Math_primeFactor(p: number[], value: number): number[][] {
    var ans: number[][] = [];
    var valmax = value / 2;;
    for (var i = 0; i < p.length; i++) {
        var prime = p[i];
        if (valmax < prime) break;
        var count = 0;
        while (value % prime == 0) {
            value /= prime;
            count++;
        }
        if (count != 0) {
            ans.push([prime, count]);
        }
        if (value == 1) break;
    }
    return ans;
}
*/

// union-find lib
/*
var g_uf_root: number[];
var g_uf_count: number[];
function UF_initRoot(num: number) {
    g_uf_root = new Array(num).fill(-1);
    g_uf_count = new Array(num).fill(1);
}
function UF_getRoot(index: number) {
    if (g_uf_root[index] < 0) {
        return index;
    } else {
        var work0: number = UF_getRoot(g_uf_root[index]);
        g_uf_root[index] = work0;
        return work0
    }
}
function UF_mergeRoot(a: number, b: number) {
    var root0: number = UF_getRoot(a);
    var root1: number = UF_getRoot(b);
    if (root0 == root1) return;
    if (root0 > root1) [root0, root1] = [root1, root0];
    g_uf_count[root0] += g_uf_count[root1];
    g_uf_count[root1] = 0;
    g_uf_root[root1] = root0;
}
*/

// entrypoint
function entrypoint() {
    try {
        // linux
        var input = fs.readFileSync("/dev/stdin", "utf8").trim().split("\n");
        console.debug = function () { };
        main(input);
    }
    catch (ex) {
        // windows
        const lines: string[] = [];
        // @ts-ignore
        const reader = require('readline').createInterface({
            // @ts-ignore
            input: process.stdin,
            // @ts-ignore
            output: process.stdout
        });
        reader.on('line', function (line: string) {
            lines.push(line);
        });
        reader.on('close', function () {
            input = lines;
            main(input);
        });
    }
}
entrypoint();


import * as fs from 'fs'
import {debug} from '../../../util'

const input = fs.readFileSync('/dev/stdin', 'utf8')
const output = (x: any) => console.log(x)
const S = input
S === 'ABC' ? output('ARC') : output('ABC')


import * as fs from 'fs'

const input = fs.readFileSync('/dev/stdin', 'utf8')

input.trim()

switch (input) {
    case 'ABC':
        console.log('ARC')
        break
    case 'ARC':
        console.log('ABC')
        break
}


S = input()

flag = True
if S[0] != "A":flag = False
if S[2:-1].count("C") != 1:flag = False
if flag:
    ind = S[2:-1].index("C") + 2
    print("AC") if (S[1:ind] + S[ind+1:]).islower() else print("WA")
else:
    print("WA")


import sys

s = input()
if s[0] == 'A':
    if 'C' in s[2:-1]:
        index = s[2:-1].index('C') + 2
        news = s[1:index] + s[index+1:]
        if news == news.lower():
            print('AC')
            sys.exit()
print("WA")


import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

alpha2num = lambda c: ord(c) - ord('a') + 1

s = input()
ans = "WA"
if s[0] == "A" and s.count("C") == 1:
    if 2 <= s.index("C") <= len(s) - 2:
        for i in range(1, len(s)):
            if i == s.index("C"):
                continue
            elif 1 <= alpha2num(s[i]) <= 26:
                ans = "AC"
            else:
                ans = "WA"
                break
print(ans)


s=input()
if s[0]=="A" and "C" in s[2:-1] and len(re.findall('[A-Z]', s))==2:
    print("AC")
else:
    print("WA")


a = input()
b = a[2:len(a)-1]
if a[0] == "A" and b.count("C") == 1:
  print("AC")
else:
  print("WA")


S=input()
k=0
z=0
cnt=0
if S[0]=='A':
    for i in range(2,len(S)-1):
        if S[i]=='C':
            k=i
            cnt += 1
            z=100
            if z==100 and cnt==1:
                for j in range(1,k):
                    if 'a'<=S[j]<='z':
                        z=200
                    else:
                        z=101
                if z==200 :
                    for l in range(k+1,len(S)):
                        if 'a'<=S[l]<='z':
                            z=102
                        else:
                            z=101
if z == 101 or 0 or 100:
    print('WA')
else:
    print('AC')


import java.io.*;

public class Main {

	final static long MOD = 1000000007;
	public static String[] Ws = null;
	public static int wsIndx = 0;
	public static BufferedReader in = null;
	public static void main(String[] args) throws Exception {

		String S =nextString();
		String ans = "AC";
		StringBuffer sb = new StringBuffer(S);
		for(int i=2;i<sb.length()-1;i++){
			if(sb.charAt(i)=='C'){
				sb.deleteCharAt(i);
				break;
			}
			if(i==sb.length()-2){
				sb.append("C");
			}
		}

		if(sb.charAt(0)=='A'){
			sb.deleteCharAt(0);
		}else{
			sb.append("C");
		}

		while(sb.length()>0){
			if(Character.isUpperCase(sb.charAt(0))){
				break;
			}
			sb.deleteCharAt(0);
		}
		System.out.println(sb.length()==0?"AC":"WA");
	}

	public static void check() throws Exception{
		if(in == null){
			in = new BufferedReader(new InputStreamReader(System.in));
		}
		if(Ws==null || Ws.length<=wsIndx){
			Ws = in.readLine().split(" ");
			wsIndx=0;
		}
	}
	public static int nextInt()throws Exception{
		check();
		return Integer.parseInt(Ws[wsIndx++]);
	}

	public static long nextLong()throws Exception{
		check();
		return Long.parseLong(Ws[wsIndx++]);
	}

	public static String nextString()throws Exception{
		check();
		return Ws[wsIndx++];
	}

	public static int[] nextInts()throws Exception{
		check();
		int[] tmp = new int[Ws.length];
		for(int i=0;i<tmp.length;i++){
			tmp[i]=Integer.parseInt(Ws[i]);
		}
		wsIndx=Ws.length;
		return tmp;
	}

	public static long[] nextLongs()throws Exception{
		check();
		long[] tmp = new long[Ws.length];
		for(int i=0;i<tmp.length;i++){
			tmp[i]=Long.parseLong(Ws[i]);
		}
		wsIndx=Ws.length;
		return tmp;
	}

	public static String[] nextStrings()throws Exception{
		check();
		wsIndx=Ws.length;
		return Ws;
	}

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        String word = input.readLine();

        boolean state = true;

        state &= word.charAt(0) == 'A';
        boolean foundC = false;

        for (int i = 1; i < word.length(); i++) {
            if (!foundC && i >=2 && i <= word.length() -2 && word.charAt(i) == 'C'){
                foundC = true;
            }else if (!Character.isLowerCase(word.charAt(i))){
                state = false;
                break;
            }
        }

        if (foundC && state)
            System.out.println("AC");
        else
            System.out.println("WA");
    }
}


import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) throws Exception{
		// TODO 自動生成されたメソッド・スタブ
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String S = br.readLine();

		if(S.charAt(0) != 0x41){
			System.out.println("WA");
			return;
		}
		if(!(S.charAt(1)>0x60 && S.charAt(1)<0x7B)){
			System.out.println("WA");
			return;
		}
		int cnt = 0;
		for(int i=2;i<S.length()-1;i++){
			if(S.charAt(i) == 'C'){
				cnt++;
			}else if(!(S.charAt(i)>0x60 && S.charAt(i)<0x7B)){
				System.out.println("WA");
				return;
			}
		}
		if(cnt  != 1){
			System.out.println("WA");
			return;
		}
		if(!(S.charAt(S.length()-1)>0x60 && S.charAt(S.length()-1)<0x7B)){
			System.out.println("WA");
			return;
		}
		System.out.println("AC");
	}

}


import java.util.*; import java.io.*; import java.math.*;
public class Main{
	//Don't have to see. start------------------------------------------
	static class InputIterator{
		ArrayList<String> inputLine = new ArrayList<String>(1024);
		int index = 0; int max; String read;
		InputIterator(){
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			try{
				while((read = br.readLine()) != null){
					inputLine.add(read);
				}
			}catch(IOException e){}
			max = inputLine.size();
		}
		boolean hasNext(){return (index < max);}
		String next(){
			if(hasNext()){
				return inputLine.get(index++);
			}else{
				throw new IndexOutOfBoundsException("There is no more input");
			}
		}
	}
	static HashMap<Integer, String> CONVSTR = new HashMap<Integer, String>();
	static InputIterator ii = new InputIterator();//This class cannot be used in reactive problem.
	static PrintWriter out = new PrintWriter(System.out);
	static void flush(){out.flush();}
	static void myout(Object t){out.println(t);}
	static void myerr(Object t){System.err.print("debug:");System.err.println(t);}
	static String next(){return ii.next();}
	static boolean hasNext(){return ii.hasNext();}
	static int nextInt(){return Integer.parseInt(next());}
	static long nextLong(){return Long.parseLong(next());}
	static double nextDouble(){return Double.parseDouble(next());}
	static ArrayList<String> nextStrArray(){return myconv(next(), 8);}
	static ArrayList<String> nextCharArray(){return myconv(next(), 0);}
	static ArrayList<Integer> nextIntArray(){
		ArrayList<String> input = nextStrArray(); ArrayList<Integer> ret = new ArrayList<Integer>(input.size());
		for(int i = 0; i < input.size(); i++){
			ret.add(Integer.parseInt(input.get(i)));
		}
		return ret;
	}
	static ArrayList<Long> nextLongArray(){
		ArrayList<String> input = nextStrArray(); ArrayList<Long> ret = new ArrayList<Long>(input.size());
		for(int i = 0; i < input.size(); i++){
			ret.add(Long.parseLong(input.get(i)));
		}
		return ret;
	}
	static String myconv(Object list, int no){//only join
		String joinString = CONVSTR.get(no);
		if(list instanceof String[]){
			return String.join(joinString, (String[])list);
		}else if(list instanceof ArrayList){
			return String.join(joinString, (ArrayList)list);
		}else{
			throw new ClassCastException("Don't join");
		}
	}
	static ArrayList<String> myconv(String str, int no){//only split
		String splitString = CONVSTR.get(no);
		return new ArrayList<String>(Arrays.asList(str.split(splitString)));
	}
	public static void main(String[] args){
		CONVSTR.put(8, " "); CONVSTR.put(9, "\n"); CONVSTR.put(0, "");
		solve();flush();
	}
	//Don't have to see. end------------------------------------------
	static void solve(){//Here is the main function
      ArrayList<String> s = nextCharArray();
      if(!s.get(0).equals("A")){
        myout("WA");
        return;
      }
      int cCount = 0;
      int cIndex = 0;
      for(int i = 0; i < s.size() - 1; i++){
        if(s.get(i).equals("C")){
          cCount++;
          cIndex = i;
        }
      }
      if(cCount != 1){
        myout("WA");
        return;
      }
      String strlist = "abcdefghijklmnopqrstuvwxyz";
      for(int i = 0; i < s.size(); i++){
        if(i == 0 || i == cIndex){
          continue;
        }
        if(!strlist.contains(s.get(i))){
          myout("WA");
          return;
        }
      }
      myout("AC");
	}
	//Method addition frame start

	//Method addition frame end
}


import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();

        if (s[0] != 'A') {
            System.out.println("WA");
            return;
        }

        int countC = 0;
        int position = 0;
        for (int i = 2; i < s.length-2; i++) {
            if (s[i] == 'C') {
                countC++;
                position = i;
            }
        }

        if (countC != 1) {
            System.out.println("WA");
            return;
        }

        for (int i = 1; i < s.length; i++) {
            if (i == position) continue;
            if (Character.isUpperCase(s[i])) {
                System.out.println("WA");
                return;
            }
        }

        System.out.println("AC");
    }
}


import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Scanner;
import java.util.Set;

public class Main{

	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);
		char[] num = scanner.nextLine().toCharArray();

		String flag = "AC";

		//#1
		if(num[0] != 'A')flag = "WA";

		//#2
		int cnt  = 0;
		for(int i = 2; i < num.length - 2; i++) {

			if(num[i] == 'C') {

				cnt++;
			}else if(Character.isUpperCase(num[i])) {

				flag = "WA";
				break;
			}
		}

		if(Character.isUpperCase(num[1]) || cnt > 1 || cnt == 0)flag = "WA";

		System.out.println(flag);

	}
}


#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <map>
#include <set>
#include <vector>
#include <functional>
#include <algorithm>
#include <stack>
#include <queue>
//#include <iostream>
//#include <sstream>
using namespace std;
#define all(cont) cont.begin(), cont.end()
#define rall(cont) cont.end(), cont.begin()
#define mp make_pair
#define pb push_back
#define fs first
#define sc second
#define pf printf
#define sf scanf
#define fr(i, a, b) for(int i = a ; i < b ; i++)
#define frr(i, a, b) for(int i = a ; i >= b ; i--)
#define tr(it, var) for(__typeof(var.begin()) it = var.begin(); it != var.end(); it++)
#define trr(rit, var) for(__typeof(var.rbegin()) rit = var.rbegin(); rit != var.rend(); rit++)
#define its(x) static_cast< ostringstream & >( ( ostringstream() << dec << x ) ).str()
#define boost ios_base::sync_with_stdio(false); cin.tie(NULL)
#define deb(x) cout << #x" = " << x << '\n'
#define has(cont, x) ((cont).find((x)) != (cont).end())
#define sz(x) ((int)(x).size())
//typedef
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
//bitmask
int onbit(int x, int pos) {x |= (1 << pos); return pos;}
int offbit(int x, int pos) {x &= ~(1 << pos); return x;}
int test(int x, int pos) {return x & (1 << pos);}
int flip(int x, int pos) {x ^= (1 << pos); return x;}
int lsb(int x) {return x & (-x);}
int onbitall(int x, int pos) {x = (1 << pos)-1; return x;}
//constants
const double EPS = 1e-9;
const double PI = 2*acos(0.0);
const int INF = 0x3f3f3f3f;
const int MOD = 1e9+7;
//moves
const int dx1[] = {0, 1, 0, -1};
const int dy1[] = {1, 0, -1, 0};
const int dx2[] = {-1, -1, -1, 0, 0, 1, 1, 1};
const int dy2[] = {-1, 0, 1, -1, 1, -1, 0, 1};

int main() {
//    freopen("input.in", "r", stdin);
	bool ok = true;
	char a[1234];
	sf("%s", a);
	if(a[0] != 'A') ok = false;
	int pos = 0, cn = 0;
	fr(i, 0, strlen(a)) {
		if(a[i] == 'C') {
			cn++;
			pos = i;
		}
	}
	if(cn != 1) ok = false;
	if(pos < 2 || pos == strlen(a)-1) ok = false;
	fr(i, 0, strlen(a)) {
		if(a[i] != 'A' && a[i] != 'C')
			if(a[i] >= 'A' && a[i] <= 'Z') ok = false;
	}
	puts(ok ? "AC" : "WA");
	return 0;
}


#include<stdio.h>
#include<string.h>
int main()
{
	char S[11];
	scanf("%s", S);
	if (S[0] != 'A')
	{
		printf("WA");
		return 0;
	}
	int i;
	int counter = 0;
	for ( i = 1; i < strlen(S); i++)
	{
		if (2 <= i&& i <= strlen(S) - 2 && S[i] == 'C')
			counter++;
		else if (S[i] >= 'A'&&S[i] <= 'Z')
		{
			printf("WA");
			return 0;
		}
	}
	if (counter == 1)
		printf("AC");
	else
		printf("WA");
	return 0;
}


#include<cstdio>
#include<cstring>

char s[233];

int main(){
	scanf("%s",s+1);
	int len=strlen(s+1);
	if(s[1]!='A'){
		puts("WA");
		return 0;
	}
	int cnt=0;
	for(int i=3;i<=len-1;i++)
		if(s[i]=='C'){
			cnt++; s[i]='a';
		}
	if(cnt!=1){
		puts("WA");
		return 0;
	}
	for(int i=2;i<=len;i++)
		if(s[i]<'a' || s[i]>'z'){
			puts("WA"); return 0;
		}
	puts("AC");
	return 0;
}


#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int,int>;
#define chmax(x,y) x = max(x,y);
#define chmin(x,y) x = min(x,y);
const int di[] = {-1, 0, 1, 0};
const int dj[] = {0, -1, 0, 1};
const int INF = 1001001001;

int main() {
    string s;
    cin >> s;
    int n = s.size();
    if (s[0] != 'A') {
        cout << "WA" << endl;
        return 0;
    }
    int cnt = 0;
    for (int i = 1; i < n; i++) {
        if ('A' <= s[i] && s[i] <= 'Z') {
            if (!(i >= 2 && i <= n-2)) {
                cout << "WA" << endl;
                return 0;
            }
            if (cnt == 1) {
                cout << "WA" << endl;
                return 0;
            }
            if (s[i] != 'C') {
                cout << "WA" << endl;
                return 0;
            }
            cnt++;
        }
    }
    cout << "AC" << endl;
    return 0;
}


#include <math.h>
#include <stdio.h>

#include <algorithm>
#include <cstdio>
#include <iostream>
#include <string>
#include <vector>

//コンパイラ最適化
#pragma GCC optimize("Ofast")

/*

 */
//マクロ
// forループ
//引数は、(ループ内変数,動く範囲)か(ループ内変数,始めの数,終わりの数)、のどちらか
// Dがついてないものはループ変数は1ずつインクリメントされ、Dがついてるものはループ変数は1ずつデクリメントされる
// FORAは範囲for文(使いにくかったら消す)
#define REP(i, n) for (ll i = 0; i < ll(n); i++)
#define REPD(i, n) for (ll i = n - 1; i >= 0; i--)
#define FOR(i, a, b) for (ll i = a; i <= ll(b); i++)
#define FORD(i, a, b) for (ll i = a; i >= ll(b); i--)
#define FORA(i, I) for (const auto &i : I)
// xにはvectorなどのコンテナ
#define ALL(x) x.begin(), x.end()
#define SIZE(x) ll(x.size())
#define SORT(x) sort(x.begin(), x.end())
//定数
#define INF 1000000000000  // 10^12:∞
#define MOD 1000000007     // 10^9+7:合同式の法
#define MAXR 100000        // 10^5:配列の最大のrange
//略記
#define PB push_back  //挿入
#define MP make_pair  // pairのコンストラクタ
#define F first       // pairの一つ目の要素
#define S second      // pairの二つ目の要素

typedef long long ll;
using namespace std;
int stringcount(string s, char c) { return count(s.cbegin(), s.cend(), c); }
int uppercount(string s) {
  int cnt = 0;
  REP(i, s.length()) {
    if (isupper(s[i])) cnt++;
  }
  return cnt;
}
int main() {
  string S;
  cin >> S;
  bool flg = false;
  if (S[0] == 'A' && stringcount(S.substr(2, S.length() - 1), 'C') == 1 &&
      uppercount(S) == 2) {
    flg = true;
  }
  if (flg)
    cout << "AC";
  else
    cout << "WA";
  return 0;
}


#include<stdio.h>
#include<string.h>
int main(void)
{
    char s[11];
    int i,j=1,c=0,a=2;
    scanf("%s",s);
    for(i=2;i<=strlen(s)-2;i++)
        if(s[i]=='C')
            c++;
    while(s[j]!='\0'){
        if((s[j]>='a')&&(s[j]<='z'))
            a++;
        j++;
    }
    if((s[0]=='A')&&(c==1)&&(a==strlen(s)))
        printf("AC\n");
    else printf("WA\n");
    return 0;
}


#pragma target("avx2")
#pragma optimize("O3")
#include<stdio.h>
#include<stdbool.h>

int main(void){
        char s[10];
        int l = 0, i, cnt = 0;
        bool ok = true;
        while((s[l]=getchar())!='\n') l++;
        for(i=0; i<l; i++){
                if('a'<=s[i] && s[i]<='z') cnt++;
                else if(s[i]=='C') ok &= (1<i && i<l-1);
                else if(s[i]=='A') ok &= (i==0);
                else ok = false;
        }
        if(ok && cnt==l-2) puts("AC");
        else puts("WA");
        return 0;
}


//b.c B-AcCepted
#include<stdio.h>
#include<string.h>
#include<stdbool.h>

int komoji(char c){
    if((c>='a')&&(c<='z')){
        return 1;
    }
    return 0;
}

int oomoji(char c){
    if((c>='A')&&(c<='Z')){
        return 1;
    }
    return 0;
}

int main(void){
    char buf[11];
    bool flag = true;
    scanf("%s",buf);
    bool ff = false;
    int num=-1,count=0;
    int len = strlen(buf);

    if(buf[0]!='A'){
        flag = false;
    }

    for(int i=2;i<len-1;++i){
        if(buf[i]=='C'){
            num = i;
            count++;
        }
        if(oomoji(buf[i])&&buf[i]!='C'){
            flag = false;
        }
    }
    if(count!=1){
        flag = false;
    }

    for(int i=1;i<len;++i){
        if(!komoji(buf[i])&&i!=num){
            flag = false;
        }
    }

    if(flag){
        printf("AC\n");
    }else{
        printf("WA\n");
    }

    return 0;
}


#include <stdio.h>
#include <string.h>

int main() {
	char S[9];
	scanf("%c",&S);
	if (S[0] == 'A') {
		if(S[2] == 'C' || S[strlen(S)-3] == 'C') {
			printf("AC");
		} else {
			printf("WA");
		}
	} else {
		printf("WA");
	}
}


#include <stdio.h>
#include <string.h>

int main() {
	char S[9];
	scanf("%c",S);
	if (S[0] == 'A') {
		if(S[2] == 'C' || S[strlen(S)-3] == 'C') {
			printf("AC");
		} else {
			printf("WA");
		}
	} else {
		printf("WA");
	}
}


'use strict'

const main = (input) => {
    const S = input.split('\n')[0]
    const chars = S.split('')

    const first = chars.shift()
    if (first !== 'A') {
        console.log('WA')
        return
    }

    const arr = chars.slice(1, -1)
    if(arr.filter(v => v === 'C').length !== 1) {
        console.log('WA')
        return
    }
    let count = 0
    chars.forEach((v) => {
        if(v !== v.toLowerCase()){
            count++
        }
    })
    if(count === 1){
        console.log('AC')
    }else{
        console.log('WA')
    }
}

main(require('fs').readFileSync('/dev/stdin', 'utf-8'))


'use strict';
// inputに入力データ全体が入る
function Main(input) {
	// 1行目がinput[0], 2行目がinput[1], …に入る
	input = input.split("\n");
    const s = input[0];
    if(s[0] != "A"){
        console.log("WA");
        return 0;
    }
    let numC = 0;
    for(let i = 1; i < s.length; i++){
        if(i >= 2 && i <= s.length - 2 && s[i] == "C"){
            numC++;
            if(numC > 1){
                console.log("WA");
                return 0;
            }
        }else if(s[i].search(/[a-z]/) == -1){
            console.log("WA");
            return 0;
        }
    }
    if(numC != 1){
        console.log("WA");
    }else{
        console.log("AC");
    }
}
//*この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
Main(require("fs").readFileSync("/dev/stdin", "utf8"));


'use strict'

function main(input) {

  const isUpper = (char) => {
    return /[A-Z]/g.test(char);
  }

  const str = input.split('\n')[0];
  let ans = 'AC';

  const s1 = str.charAt(0);
  if (s1 !== 'A') ans = 'WA';

  const s2 = str.charAt(1);
  if (isUpper(s2)) ans = 'WA';

  const s3 = str.slice(2, str.length - 1).split('');
  let upper = 0;
  let hasC  = 0;
  for (const c of s3) {
    if (c === 'C') hasC += 1;
    if (isUpper(c)) upper += 1;
  }
  if (upper !== 1 || hasC !== 1) ans = 'WA'

  const s4 = str.charAt(str.length - 1);
  if (isUpper(s4)) ans = 'WA';

  console.log(ans);
}

main(require("fs").readFileSync("/dev/stdin", "utf8"));


function main(input) {
  const ratz = /[a-z]/
  const S = input.split('');
  let ans = 'WA';
  let cCnt = 0;
  let lowCnt = 0;

  for (let i = 0; i < S.length; i++) {
    // 小文字カウント
    if (ratz.test(S[i])) {
      lowCnt++;
    }

    // C文字判定
    if (2 <= i && i < S.length - 1) {
      if(S[i] === 'C') { cCnt++; }
    }
  }

  if (S[0] === 'A'
      && cCnt === 1
      && lowCnt === (S.length - 2)) {
    ans = 'AC';
  }

  console.log(ans);
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));


function main(input) {
  const ratz = /[a-z]/
  const S = input.split('');
  let ans = 'WA';
  let cCnt = 0;
  let lowCnt = 0;

  for (let i = 0; i < S.length; i++) {
    if (ratz.test(S[i])) {
      lowCnt++;
    }

    if (2 <= i && i < S.length - 1) {
      if(S[i] === 'C') { cCnt++; }
    }
  }

  if (S[0] === 'A'
      && cCnt === 1
      && lowCnt === (S.length - 2)
  ) {
    ans = 'AC';
  }

  console.log(ans);
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));


/*
-------関数一覧--------
arr1dto2d(Array) 一次元配列を二次元配列にします
pf(N)因数分解した結果をオブジェクトで返します
gcd(a,b)最大公約数を返します
lcm(a,b)最小公倍数を返します
num(a,b)a-bを返します。ソート用です
isPrime(n)素数かどうか真偽値で返します
isNumber(n)数かどうか真偽値で返します
arrsum(arr)配列の合計値を返します
nibu(arr,n)n以下で最も大きい数の添字を返します(nを含みます)
br(input)入力を改行で区切ります
*/
const debugMode = false;
const inf = Number.MAX_SAFE_INTEGER;

function Main(input){
    input =input.split("");
    var flag = true;
    if(input[0]!="A") flag = false;
    input.shift();
    input.shift();
    input.pop();
    input = input.join("").split("C");
    if(input.length!=2) flag = false;
    input = input.join("").split("");
    input.forEach(function(val){
        if(val.charCodeAt(0)<96) flag = false;
    })
    console.log(flag?"AC":"WA");
}Main(require("fs").readFileSync("/dev/stdin", "utf8").trim());
function next(m,now){

}
function zisyozyunn(a){
  var arr = [];
  for(var i=0;i<input[0];i++){
    arr.push(i+1);
  }
  var sum = 0;
  for(i=0;i<a.length;i++){
    var f = arr.findIndex(val => val==a[i]);
    sum += factorialize(a.length-1-i)*f;
    arr.splice(f,1);
  }
  return sum;
}
function arrsum(arr){
  var sum = 0;
  for (var i=0,len=arr.length; i<len; ++i) {
      sum += arr[i]-0;
  };
  return sum;
}
function debug(val){
  if(debugMode==true){
    console.log(val)
  }
}
function arrMaxPoint(arr){
	var max = Number.MIN_SAFE_INTEGER;
	var point = -1;
	for(var i=0;i<arr.length;i++){
		if(max<arr[i]){
			max = arr[i];
			point = i;
		}
	}
	return point;
}
function arrMinPoint(arr){
	var min = Number.MAX_SAFE_INTEGER;
	var point = -1;
	for(var i=0;i<arr.length;i++){
		if(min>arr[i]){
			min = arr[i];
			point = i;
		}
	}
	return point;
}
function arr1dto2d (arr){
	for(var i=0;i<arr.length;i++){
		arr[i]=arr[i].split("");
		}
	return arr;
}
function isPrime(n){
    if(false===Number.isInteger(n)){
        return false;
    }
    if(n<=1){
        return false;
    }
    if(2===n){
        return true;
    }
    if(0===n%2){
        return false;
    }
    var square_root = Math.floor(Math.sqrt(n));
    for(var i=3; i<=square_root; i+=2){
        if(0===n%i){
            return false;
        }
    }
    return true;
}
function isNumber(val){
	const pat = /^([1-9]\d*|0)$/;
	return pat.test(val);
}
function arr1dto2d (arr){
	for(var i=0;i<arr.length;i++){
		arr[i]=arr[i].split("");
		}
	return arr;
}
function factorialize(num) {
  if (num === 0) { return 1; }
  return num * factorialize(num-1);
}
function arr1dto2d (arr){
	for(var i=0;i<arr.length;i++){
    arr[i]=arr[i].split(" ").map(Number);
    }
  return arr;
}
function rotate(array) {
  const ROW = array.length;
  const COL = array[0].length;
  const row = ROW-1;
  var a = new Array(COL);
  for (var c=0; c<COL; c++) {
    a[c] = new Array(ROW);
    for (var r=0; r<ROW; r++) {
      a[c][r] = array[row-r][c];
    }
  }
  return a;
}
function part_in(base,push,st){
	for(var i=st,p=0;p<push.length;i++,p++){
		base[i] = push[p];
	}
	return base;
}
function part_reverse(arr,s,g){
	var push = arr.slice(s-1,g);
  push.reverse();
	arr = part_in(arr,push,s-1);
	return arr;
}
function zeroPadding(num,length){
    return (num + '000000000000000000000000000000000').slice(0,length);
}
function arrsum(arr){
    var sum = 0;
    for (var i=0,len=arr.length; i<len; ++i) {
        sum += arr[i]-0;
    };
    return sum;
}
function pf(n) {
    var result = {};

    if (n === 1) {
        return {"1":1}
    }

    var init = 2;

    while (n !== 1) {
        var i = init;
        while (i < Number.MAX_SAFE_INTEGER) {
            if (n % i === 0) {
                n /= i;
                if (!(result[i] > 0)) {
                    result[i] = 0;
                }
                result[i]++;
                break;
            }
            i++;
        }
        init = i;
    }
    return result;
}
function gcd(a, b) {
    if (b === 0){
        return a
    }
    return gcd(b, a % b)
}
function lcm(a,b) {
    var g = (n, m) => m ? g(m, n % m) : n
    return a * b / g(a, b)
}
function num(a, b) {
  return a - b;
}
function nibu(a,searchValue){
	var index = -1;

//調べる左端を表す添字(index)
var left = 0;

//調べる右端を表す添字(index)
var right = a.length-1;

//左端と右端にデータがある間は処理を繰り返す
while(left <= right){

    //左右の真ん中を表す添字(index)
    middle =Math.floor((left +right)/2);

    //真ん中の値と探す値を比較する
    if(a[middle]==searchValue){
        //一致した場合、変数に入れて処理終了
        index = middle;
        break;
    }else if(a[middle]<searchValue){
        //探す値より小さい場合、左側にはもっと小さい値しかないので左端の値を真ん中の値の右に移動する
        left = middle +1;
    }else{
        //探す値より大きい場合、右側にはもっと大きい値しかないので右端の値を真ん中の値の左に移動する
        right = middle -1;
    }
}
if(index!=-1) return index;
else return left;
}
function br(input){
  return input.split("\n");
}
function is_sortred(arr){
  var flag = true;
  for(var i=1;i<arr.length;i++){
    if(arr[i-1]>arr[i]){
      flag = false;
      break;
    }
  }
  return flag;
}


package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

const mod = 1000000007

// 1MB
const ioBufferSize = 1 * 1024 * 1024

var sc = func() *bufio.Scanner {
	sc := bufio.NewScanner(os.Stdin)
	sc.Buffer(make([]byte, ioBufferSize), ioBufferSize)
	sc.Split(bufio.ScanWords)
	return sc
}()

func next() string {
	sc.Scan()
	return sc.Text()
}

func nextInt() int {
	sc.Scan()
	i, e := strconv.Atoi(sc.Text())
	if e != nil {
		panic(e)
	}
	return i
}

func main() {
	s := next()

	if s[0] != 'A' {
		fmt.Println("WA")
		return
	}

	cCount := 0
	for i := 2; i <= len(s)-2; i++ {
		if s[i] == 'C' {
			cCount++
		}
	}
	if cCount != 1 {
		fmt.Println("WA")
		return
	}

	for i := 0; i < len(s); i++ {
		if !(s[i] == 'A' || s[i] == 'C' || (s[i] >= 'a' && s[i] <= 'z')) {
			fmt.Println("WA")
			return
		}
	}

	fmt.Println("AC")
}


package main

import (
	"fmt"
)

func main() {
	var s string
	fmt.Scan(&s)

	var ng = false
	if s[0] != 'A' {
		ng = true
	}

	var sub = s[2 : len(s)-1]
	var indexC = 2
	var countC = 0
	for i, c := range sub {
		if c == 'C' {
			countC++
			indexC += i
		}
	}
	if countC != 1 {
		ng = true
	}

	for i, c := range s {
		if i == 0 || i == indexC {
			continue
		}
		if 'A' <= c && c <= 'Z' {
			ng = true
		}
	}

	if ng {
		fmt.Println("WA")
	} else {
		fmt.Println("AC")
	}
}


package main

import (
	"fmt"
	"strings"
)

func main() {
	var s string
	fmt.Scan(&s)

	if s[0] != 'A' {
		fmt.Println("WA")
		return
	}

	var cnt int
	for i, c := range s {
		if i > 0 && c != 'C' {
			if !isLower(string(c)) {
				fmt.Println("WA")
				return
			}
		}

		if i > 1 && i < len(s)-1 && c == 'C' {
			cnt++
		}
	}
	if cnt != 1 {
		fmt.Println("WA")
		return
	}

	fmt.Println("AC")
}

func isLower(s string) bool {
	return s == strings.ToLower(s)
}


package main

import (
	"fmt"
	"strings"
)

func main() {
	var s string
	fmt.Scan(&s)

	if s[0] != 'A' {
		fmt.Println("WA")
		return
	}
	var count int
	for _, c := range s[2 : len(s)-2] {
		if c == 'C' {
			count++
		}
	}
	if count != 1 {
		fmt.Println("WA")
		return
	}

	var upperCount int
	for i := 0; i < len(s); i++ {
		if strings.ToUpper(string(s[i])) == string(s[i]) {
			upperCount++
		}
	}

	if upperCount != 2 {
		fmt.Println("WA")
		return
	}
	fmt.Println("AC")
}


package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

var sc = bufio.NewScanner(os.Stdin)

func main() {
	scanInit()

	s := nextStr()

	if s[0] != 'A' {
		fmt.Println("WA")
		return
	}
	if strings.Count(s, "C") != 1 {
		fmt.Println("WA")
		return
	}
	cidx := strings.Index(s, "C")
	if cidx == 1 || cidx == len(s)-1 {
		fmt.Println("WA")
		return
	}

	for i := 1; i < len(s)-1; i++ {
		if s[i] != 'C' {
			if 'a' > s[i] || s[i] > 'z' {
				fmt.Println("WA")
				return
			}
		}
	}

	fmt.Println("AC")

}

// ---- readfunc
func scanInit() {
	const cap = 200 * 1024 // Default=64
	var buf = make([]byte, cap)
	sc.Buffer(buf, cap)
	sc.Split(bufio.ScanWords)
	return
}
func nextInt() int {
	sc.Scan()
	i, e := strconv.Atoi(sc.Text())
	if e != nil {
		panic(e)
	}
	return i
}
func nextStr() string {
	sc.Scan()
	return sc.Text()
}


package main

import (
	"bufio"
	"fmt"
	"os"
	"sort"
	"strconv"
)

func out(x ...interface{}) {
	fmt.Println(x...)
}

var sc = bufio.NewScanner(os.Stdin)

func getInt() int {
	sc.Scan()
	i, e := strconv.Atoi(sc.Text())
	if e != nil {
		panic(e)
	}
	return i
}

func getInts(N int) []int {
	ret := make([]int, N)
	for i := 0; i < N; i++ {
		ret[i] = getInt()
	}
	return ret
}

func getString() string {
	sc.Scan()
	return sc.Text()
}

// min, max, asub, absなど基本関数
func max(a, b int) int {
	if a > b {
		return a
	}
	return b
}

func min(a, b int) int {
	if a < b {
		return a
	}
	return b
}

func asub(a, b int) int {
	if a > b {
		return a - b
	}
	return b - a
}

func abs(a int) int {
	if a >= 0 {
		return a
	}
	return -a
}

func lowerBound(a []int, x int) int {
	idx := sort.Search(len(a), func(i int) bool {
		return a[i] >= x
	})
	return idx
}

func upperBound(a []int, x int) int {
	idx := sort.Search(len(a), func(i int) bool {
		return a[i] > x
	})
	return idx
}

func main() {
	sc.Split(bufio.ScanWords)
	sc.Buffer([]byte{}, 1000000)
	s := getString()
	ans := true
	if s[0] != 'A' {
		ans = false
	}
	cnt := 0
	if s[1] >= 'a' && s[1] <= 'z' {
		ans = false
	}
	for i := 2; i <= len(s)-2; i++ {
		if s[i] == 'C' {
			cnt++
		} else if s[i] >= 'a' && s[i] <= 'z' {
			ans = false
		}
	}
	if s[len(s)-1] >= 'a' && s[len(s)-1] <= 'z' {
		ans = false
	}

	if cnt != 1 {
		ans = false
	}
	if ans {
		out("AC")
		return
	}
	out("WA")
}


puts gets.chomp =~ (/^A[a-z]+C[a-z]+$/) ? "AC" : "WA"


#正規表について　^行頭　$行末
s = gets.chomp
puts s =~ /^A[a-z]+C[a-z]+$/ ? "AC" : "WA"


s = gets.chomp
if s =~ (/^A[a-z]+C[a-z]+$/)
    puts "AC"
else
    puts "WA"
end


s=gets.chomp
flag=true
l=s.size
flag=false if s[0]!=?A
flag=false if s[1].upcase==s[1]
c=0
(2...l-1).each do |i|
  if s[i].upcase==s[i]
    c+=1 if s[i]==?C
    flag=false if s[i]!=?C
  end
  flag=false if c!=1
end
flag=false if s[l-1].upcase==s[l-1]
puts flag ? 'AC':'WA'


s=gets.chomp
flag=true
flag=false if !s[0]==?A
flag=false if s[2..s.size-2].count(?C)!=1
s.each_char.with_index do |si,idx|
  next if idx==0
  if si.upcase==si
    flag=false if idx==s.size-1||idx==1
    flag=false if si!=?C
  end
end
puts flag ? 'AC':'WA'


s=gets.chomp
flag=true
flag=false if !s[0]==?A
flag=false if s[2..s.size-2].count(?C)!=1
s.each_char.with_index do |si,idx|
  if si.upcase==si
    flag=false if idx==s.size-1||idx==1
    flag=false if si!=?A||si!=?C
  end
end
puts flag ? 'AC':'WA'