/* vim: set expandtab tabstop=4 shiftwidth=4 : */ public class Subset { public static void main(String[] args) { int k = Integer.parseInt(args[0]); if (k == 0) return; RandomizedQueue q = new RandomizedQueue(); while (!StdIn.isEmpty()) { q.enqueue(StdIn.readString()); } for (int i = 0; i < k; i++) System.out.println(q.dequeue()); System.out.println(); } }