Siemens interview question

One pattern printing question which was basic.