https://jacoby.github.io/2020/04/06/challenge-55-flipping-and-waving.html