creation of the group works
function to find the reverse element