Add solution for rotating a grid