Program to be rewrited in python, main file 2040.py and test.py