PythonLab_3: secon variant from qqmber