puzzle solved by Thiago Erba