Solution by Gustavo Chavez
