Mendels 1st Law R solution