Hello.
HINT: Before processing the input text you may chop off the spaces available in the input.

Syed.