Solve the first case.
Solve the second case.
Solve the third case.
Solve the fourth case.
Solve the fifth case.