import java.util.TreeMap;
import java.util.Collection;
import java.util.Iterator;

public class GenTest3 {
	public static void main(String[] args) {
		TopTen<String> music = new TopTen<String>();
		music.addAtPosition(1, "St. Anger/Metallica");
		music.addAtPosition(3, "20 Jahre - Nena feat. Nena/Nena");
		music.addAtPosition(2, "9/Eros Ramazotti");
		
		music.print();
	} //main()
} //class GenTest3

class TopTen<Type> {
	private TreeMap<Integer,Type> content;
	public TopTen() {
		content = new TreeMap<Integer,Type>();
	} //constructor
	public boolean addAtPosition(int pos, Type value) {
		if (content.size() == 10) {
			return false;
		} else {
			content.put(new Integer(pos), value);
			return true;
		} //else
	} //addAtPosition()
	public Type getFromPosition(int pos) {
		return content.get(new Integer(pos));
	} //getFromPosition()
	public void print() {
		Iterator<Type> i = content.values().iterator();
		while (i.hasNext()) {
			System.out.println( i.next() );
		} //while()
	} //print()
} //class TopTen