ONLY FOR EDUCATIONAL PURPOSES
Comment:
Took too long. Finally reached the target