spoj dfs easy

spoj ques:http://www.spoj.com/problems/ALLIZWEL/
somebody plzz tell me what’s wrong with my code!!
plzz tell me for which test case i m getting wron answer…:http://ideone.com/d7ebXG

//