puzzle solved by Thiago Ferreyra