Yandex interview question

How to pick appropriate database for the given task?