contest cf #97 div2
code thanks festival