Unique Path II solution