maximal length of expressions has been set (variable n, according to the task)