def TERMINAL(pattern):
    """
    Function to mark a pattern as the final one to search for.
    
    @param pattern pattern to be marked (string)
    @return marked pattern (string)
    """
    return '__TERMINAL__:{0}'.format(pattern)
