Welcome to SWI-Prolog (Multi-threaded, Version 5.6.20) Copyright (c) 1990-2006 University of Amsterdam. SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions. Please visit http://www.swi-prolog.org for details. For help, use ?- help(Topic). or ?- apropos(Word). Rotations = [[1, 2, 3], [2, 3, 1], [3, 1, 2]] EOF: halt