Solution by Jaime Corchado.
