https://blog.firedrake.org/archive/2020/04/Perl_Weekly_Challenge_53__matrix_rotation_and_string_expansion.html