_Sam's submission of Sonya and Segments | CodeChef