/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;
import java.math.*;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Queue<Object> q = new ArrayDeque<>();
		q.add(5);
		q.add("Foo");
		q.add(5d);
		q.add(5f);
		q.add(Arrays.asList(1,2,3));
		q.add(BigInteger.ONE);
		
		Object toRead;
		while((toRead = q.poll())!=null){
			System.out.format("%9s > %s%n",toRead, toRead.getClass());
		}
		
	}
}