Transition table of
M
u
d
q
1
q
1
q
2
q
2
q
1
q
3
q
3
q
2
q
4
q
4
q
3
q
5
q
5
q
4
q
5