https://practice.geeksforgeeks.org/problems/middle-of-three2926/1