2 solutions for POJ 1847 Tram