Max consequence problem

Check it out @davit :)