wa in The White Knight codechef easy

my solution: http://ideone.com/jHk7eg
can somebody plz tell why it is giving wa again and again…???