taking a new approach to solve eulerian path