Depth first generation of long patterns | Synapse