Version 3.0

Used the most simple way to do the problem, finally, no time out. This
works.