feb challenge chef and chain problem. why do i get wrong answer

CODE DELETED