Train Sort Puzzle

White Flame
12

Guide looping trains to group matching colored boxes perfectly.