ask yourself

what is the biggest command sequence that will be input ?
how does the pic know when the input seq is complete ?

when you know those answers then the answer will be obvious