adding problem lab07 from spoj-BR