Added consume input method.
Works for DFA, NFA and L-NFA.

To Do: Finite automata type detection.