Changing Deque to class Blocks.
Revert "Changing Deque to class Blocks."

This reverts commit c551f3c09295e8ba6e3b71689c568d604540a548.
Correct implementation of Deque class Blocks.