You would not believe how long it took to get to this solution.