import java.util.Iterator;

public class Main {

  public static void main(String[] a) {
    LinkedList<Integer> ll = new LinkedList<Integer>();
    ll.append(2);
    ll.append(4);
    ll.append(3);
    ll.append(7);
    ll.append(5);
    ll.append(8);
    ll.append(1);
    ll.append(0);
    ll.append(-1);
    System.out.println(ll.toString());

    int sum = 0;
/*    for (int i = 0; i < ll.length(); i++)
      sum += ll.get(i);*/
    Iterator<Integer> i = ll.iterator();
    while (i.hasNext()) {
      //sum += i.next();
      Integer current = i.next();
      System.out.println(current);
    }
  }
}
