Bit more complicated than that.
You will need to set up trusts to enable a surviving partner to stay in the joint home otherwise a sale can be enforced.
Then you have to decide who will pay for the maintenance of the home when just one of you is there. Will it be solely the responsibility of the remaining partner who might not be able to afford a major repair and who is paying to for the other parties to inherit a home in good condition. Who will decide the windows need replacing or whatever. The person living there, the family of the dead partner?
Or will the family of the dead partner have to contribute when they might not have the money to do that and will have no benefit until the property is sold, maybe many years in the future, by which time the replacement windows will be old and not adding to the value of the property.
It’s a minefield.
You really need a good solicitor who will discuss all this with you and set up a watertight agreement.