Raven (Israel) interview question

How did you build the code?