import java.io.*;

import java.util.*;

public class test2
{public static input in = new input();

public static void main(String[] args) throws IOException
 {
 PriorityQueue q = new PriorityQueue();
 q.add(new Integer(12));
 q.add(new Integer(14));
 q.add(new Integer(7));
 //for (Integer i : q)
 //      {System.out.println(i);
  // }
   System.out.println();
   System.out.println();
   System.out.println();
   while (q.size() != 0)
    {Integer i = q.remove();   // removes according to priority established by 
    System.out.println(i);     // compareTo function
 }

}
}