solve the anangrams problem.