https://helperbyte.com/questions/402872/how-to-solve-the-problem-below