First soultion to the problem