Generate a new sentence that merges two other sentences in the same way that these two sentences are merged:

John went to the store. He bought some apples.
Mary went to the restaurant. She ordered a pizza.
Mary went to the restaurant and ordered a pizza.
Complete the following task based on the instruction and optional input provided.### Instruction:
Generate a new sentence that merges two other sentences in the same way that these two sentences are merged:

John went to the store. He bought some apples.

### Input:
Mary went to the restaurant. She ordered a pizza.

### Output:
Mary went to the restaurant and ordered a pizza.