Yes it is true a Finite state machine can do this how?
you can take a Turing machine and modify it in such a way that restrict its Tap in such a way that it acts a FSM (which has finite state like a finite automata ) .and with the help of that restricted TM you can do this task.