import java.util.LinkedList;
public class MainClass {
public static void main(String[] a) {
LinkedList officers = new LinkedList();
officers.addFirst("B");
officers.addFirst("B");
officers.addFirst("H");
officers.addFirst("P");
officers.addFirst("M");
for (String s : officers)
System.out.println(s);
}
}