But the real thing is that there is no trailing spaces. Because I did not hadled the case but got AC.The problem I had with the input (and other Pascal users might have as well) is that there might be trailing spaces. Example (change '_' for spaces):
