toString for TwoWayArrayPath and First valid path creation