Cast Chain Hanayama Solution