Solution for Unique Path II.