
Can you give me some tips for this task. Should I use brute force and put 15 cases with switch ?
Thanks in advance.

yes, constraints are small enough for bruteforce

I would kill my self copying and changiing things :-)

its not that you have some hard limitations :D
Well as far as i know the 2 most used solutions are just brute force it , or you can fill a matrix and then print it out.