refactored ./Lviv_task.py