def inverse(pattern):
    """ gets the inverse pattern of a pattern """
    new_pattern = ''
    for item in pattern:
        if item == '0':
            new_pattern += '1'
        elif item == '1':
            new_pattern += '0'
        else:
            new_pattern += item
    return new_pattern