awk '{print gensub(/([0-9])x/,"\\1-","G",gensub(/([0-9])\-/,"\\1+","G",gensub(/([0-9])\+/,"\\1x","G",$0)))}' | python -c "print(input())"