How would I dismiss a modal View Controller and also its parent that was pushed?

```
self.presentingViewController?.dismiss(animated: true, completion: {
     self.parent?.navigationController?.popViewController(animated: true)
})

```

This only dismisses the top modal.