import java.util.*;

// Documentacion clase Stack: https://docs.oracle.com/javase/7/docs/api/java/util/Stack.html


public class testStackString {

   public static void main (String [ ] Args) {

      System.out.println ("Pila:");

      Stack<String> s = new Stack<String>();

      // agregar
      s.push("uno");
      s.push("dos");
      s.push("tres");
      s.push("cuatro");
      s.push("cinco");
      s.push("seis");

      while(!s.empty()) {
         // sacar de la pila
         System.out.println(s.peek());
         s.pop();
      }

   }

}