import java.util.ArrayList;
import java.util.Iterator;
public class Main {
@SuppressWarnings("unchecked")
public static void main(String[] args) {
ArrayList data = new ArrayList();
data.add("hello");
data.add("world");
Iterator it = data.iterator();
while (it.hasNext()) {
System.out.println(it.next());
}
}
}