Note: Whenever I presented this problem to people, I noticed that moments before coming up with the solution invariably and everybody uses their index finger to spatially trace the curves. After performing a few quick clockwise and counter-clockwise rotations with the finger, they verbalize their finding. There must be something to this mind-movement coordination, which my program will be unable to explore. I hope there is not any deep cognitive principle hidden there.