Original solution of fourth task

This is the original solution of the fourth taks by Kristian Azmanov