Ace Micromatic interview question

Pattern printing , matrix, palindrome