solved third problem
solved third problem