func main() var n: int :: cui@inputInt() var m: int :: cui@inputInt() var s: []char :: cui@input() var ans: bool :: true block var w: int :: 0 var a: int :: 0 for i(0, ^s - 1) switch(s[i]) case 'W' do w :+ 1 case 'A' do a :+ 1 case 'C' if(a = 0) do ans :: false break i end if do a :- 1 end switch end for end block if(ans) do s.reverse() var c: int :: 0 var a: int :: 0 for i(0, ^s - 1) switch(s[i]) case 'C' do c :+ 1 case 'A' do a :+ 1 case 'W' if(a = 0) do ans :: false break i end if do a :- 1 end switch end for end if do cui@print((ans ?("Yes", "No")) ~ "\n") end func