solution hamilton