On the Subject of Shape Shift

The concept is simple: change a shape into another shape according to certain rules. The rules, however, are not so simple.

Starting at the shape displayed on the module, follow the flowchart and submit the first shape which is visited twice.