#Breadth first search Arrive at a solution of riddle by dint of breadth first search. The question of riddle is stack all stars in field to sigle line. One of the possible solutions is follow: