Check for isomorphic strings