added Out.java from algorithms by sedgewick and wayne