give expression expression e 8 5 evaluation map e 1 give term evalvar e evalint 1 return list token represent simplified expression 1a14an expression alternate chunk symbol space separate chunk symbola chunk expression parenthese variable nonnegative integerA variable string lowercase letter include digit Note variable multiple letter note variable lead coefficient unary operator like 2x xExpressions evaluate usual order bracket multiplication addition subtractionfor example expression 1 2 3 answer 7the format output followsFor term free variable nonzero coefficient write free variable term sort order lexicographicallyfor example write term like bac abcTerms degree equal number free variable multiply count multiplicity we write large degree term answer break tie lexicographic order ignore lead coefficient termFor example aabc degree 4the lead coefficient term place directly leave asterisk separate variable exist a lead coefficient 1 printedan example wellformatte answer 2aaa 3aab 3bb 4a 5c 6term include constant term coefficient 0 includedfor example expression 0 output note you assume give expression valid all intermediate result range 231 231 1 Example 1input expression e 8 5 evalvar e evalint 1output 1a14example 2input expression e 8 temperature pressure evalvar e temperature evalint 1 12output 1pressure5example 3input expression e 8 e 8 evalvar evalint Output 1ee64 Constraints1 expressionlength 250expression consists lowercase english letter digits expression contain lead trail spacesAll token expression separate single space0 evalvarslength 1001 evalvarsilength 20evalvarsi consists lowercase english lettersevalintslength evalvarslength100 evalintsi 100