You can get rank#1, does 3 hamlet and be done with it. Tada, a non repeating hamlet solution.