Simple Python DFA