You have been hired as a system designer to develop the algorithms needed for a designer robot that can paint different patterns on the floor based on the commands it receives. The operations that the robot can perform include "move left", "move right", "move ahead" and "move back" to move to the next tile and "paint red", "paint blue" and "paint yellow" to paint the current tile with a given color.