Solution with reductions