I simplified the fourth example for easier understanding.