import java.util.*;

public class GenericStackClient {
  public static void main (String [] args) {
    GenericStack <String> s = new GenericStack<String> ();
    GenericStack <Scanner> scannerStack = new GenericStack<Scanner> ();
  
    GenericStack <Integer> intStack = new GenericStack<Integer> ();
   s.push ("lkj");
    // DOES NOT COMPILE because it's a stack of strings, not ints: s.push (17);
    
    // DOES NOT COMPILE because it's a stack of scanners, not strings: scannerStack.push("lkjl"); 
  scannerStack.push(new Scanner (System.in));
  
  Scanner res = scannerStack.pop();
  
  intStack.push (17); // boxing
  
  int value = intStack.pop(); // unboxing
  
  System.out.println(value);
  }
}

    
