Autobrains interview question

working with logs, and sets