import random


def randtour(n):
    """Construct a random tour of size 'n'."""
    sol = list(range(n))      # set solution equal to [0,1,...,n-1]
    random.shuffle(sol) # place it in a random order
    return sol