added a generalized solution for bridge problem, frozenset