If n=1 ever succeeds, it seems like you shouldn't be removing it. Rather, you should test the result in a way to indicate that what you got is not acceptable. I'm not sure what that should be, however.