Program that rotates a list of integers