from linked import Single

## A class implementing Swaplistplus as a circular linked list.

class Swaplistplus:

    ## Swaplistplus(items) produces a swaplist with the items as data.
    ## __init__:  (listof Any) -> Swaplistplus
    ## Requires: items is not empty
    def __init__(self, items):

    ## print(self) prints the sequences of values stored in self.
    ## Effects: Prints value(s)
    ## __str__: Swaplistplus -> Str
    def __str__(self):

    ## self == other produces True if the values and length
    ##     of self and other match.        
    ## __eq__: Swaplistplus Swaplistplus -> Bool
    def __eq__(self, other):

    ## self.length() produces the length of self.
    ## length: Swaplistplus -> Int
    def length(self):

    ## self.look_up(position) produces the data item in the
    ##     given position in self.
    ## loop_up: Swaplistplus, Int -> Any
    ## Requires: 0 <= position < self.length()
    def look_up(self, position):

    ## self.swap(position) swaps data items in positions
    ##     position and position + 1 in self.
    ## Effects: Mutates self by swapping data items in
    ##     positions position and position + 1.    
    ## swap: Swaplistplus Int -> None
    ## Requires: 0 <= position < self.length()-1
    def swap(self, position):

    ## self.big_swap(first, second) swaps data items
    ##     in positions first and second in self.
    ## Effects: Mutates self by swapping data items
    ##     in positions first and second.
    ## big_swap: Swaplistplus Int Int -> None
    ## Requires:0 <= first < second < self.length()
    def big_swap(self, first, second):
