def invert_mask(bin_mask: str) -> str:
    """
    Return inverted binary mask from binary mask (bin_mask).

    >>> invert_mask('11111111.11111111.11111111.00000000')
    '00000000.00000000.00000000.11111111'
    """

    inverted_mask = ''
    for char in bin_mask:
        if char == "1":
            inverted_mask += '0'
        elif char == '0':
            inverted_mask += '1'
        else:
            inverted_mask += '.'
    return inverted_mask