First Phase:

 

Second Phase: