<s> __author__ = "<STR_LIT>" <EOL> class Queue ( object ) : <EOL> def __init__ ( self ) : <EOL> self . enq = [ ] <EOL> self . deq = [ ] <EOL> def enqueue ( self , item ) : <EOL> return self . enq . append ( item ) <EOL> def deque ( self ) : <EOL> if not self . deq : <EOL> while self . enq : <EOL> self . deq . append ( self . enq . pop ( ) ) <EOL> return self . deq . pop ( ) <EOL> def peak ( self ) : <EOL> if not self . deq : <EOL> while self . enq : <EOL> self . deq . append ( self . enq . pop ( ) ) <EOL> if self . deq : <EOL> return self . deq [ - <NUM_LIT:1> ] <EOL> def size ( self ) : <EOL> return len ( self . enq ) + len ( self . deq ) <EOL> def isempty ( self ) : <EOL> return not ( self . enq + self . deq ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> q = Queue ( ) <EOL> for i in range ( <NUM_LIT:1> , <NUM_LIT:11> ) : <EOL> q . enqueue ( i ) <EOL> print '<STR_LIT>' , q . size ( ) <EOL> print '<STR_LIT>' , q . isempty ( ) <EOL> print '<STR_LIT>' , q . peak ( ) <EOL> print <EOL> print '<STR_LIT>' <EOL> for i in range ( <NUM_LIT:10> ) : <EOL> print q . deque ( ) <EOL> print '<STR_LIT>' , q . size ( ) <EOL> print '<STR_LIT>' , q . isempty ( ) <EOL> print '<STR_LIT>' , q . peak ( ) </s>
