A problem I managed to solve during my Java basics exam in SoftUni