def scratch(line):
    """ Check if scratch words exist, if exist, change them into html format

    :param line: str, the line in markdown format
    :return: str, the line in html format with scratch style
    """
    if line.count('~~') >= 2:
        for i in range(0, line.count('~~') - line.count('~~') % 2):
            if i % 2 == 0:
                line = line.replace('~~', '<del>', 1)
            else:
                line = line.replace('~~', '</del>', 1)
    return line