import java.util.ArrayList;
import java.util.LinkedList;
public class Main {
public static void main(String[] args) {
LinkedList linkedList = new LinkedList();
linkedList.push("A");
linkedList.push("B");
linkedList.push("C");
linkedList.push("D");
ArrayList arrayList = new ArrayList(linkedList);
for (String s : arrayList) {
System.out.println("s = " + s);
}
}
}