def test1(self): A = [1, 2, 3] res = perm(A) print res
def test2(self): A = [1, 1, 2] res = perm(A) print res