def uniq(string):
    """Removes duplicate words from a string (only the second duplicates).
    The sequence of the words will not be changed.

    """
    words = string.split()
    return ' '.join(sorted(set(words), key=words.index))