def format_cpf(cpf_string):
    """
    Formats CPF to standard format.

    :param cpf_string: Unformatted CPF (string)
    :return: A string in the CPF format XXX.XXX.XXX-XX
    """
    return cpf_string[:3] + '.' + cpf_string[3:6] + '.' + cpf_string[6:9
        ] + '-' + cpf_string[9:]
