def dict_to_tuple(D):
    """ Convert a dictionary using tuples as keys (K1, K2): V to a list of tuples (K1, K2, V)"""
    result = []
    for k, v in D.items():
        result.append(tuple(list(k) + [v]))
    return result