Solution by Tiago Stock
