please anyone check my code where i getting WA problem link : https://www.spoj.com/problems/ABCPATH/ sol : https://ideone.com/2bBHoq
Try this:
1 1 1 A