https://slothcoders.blogspot.com/2021/08/magic-spells-in-cpp-solution.html