require 'forwardable'




class FIFO
  extend Forwardable

  
  def self.[](*objects)
    new.push(*objects)
  end

  
  def initialize; @ary = []; end

  
  def push(*objects)
    @ary.push(*objects)
    self
  end
  alias << push
  alias enqueue push

  
  
  
  
  
  
  
  
  
  
  
  
  def_delegator:@ary, :shift, :pop
  alias shift pop
  alias dequeue shift

  
  
  
  def_delegator:@ary, :empty?

  
  
  
  def_delegator:@ary, :size
  alias length size

  
  def to_s
    
  end
  alias inspect to_s
end