solutions/max_kaskevich/4/sources/4_6: another refactoring.