import java.util.* ;

class AList implements Map.Entry<String,Integer> {
    String key ; int val ; AList next ;

    AList(String key, int val, AList next) {
      this.key = key ; this.val = val ; this.next = next ;
    }

    static AList getCell(String key, AList p) {
      for ( ; p != null ; p = p.next)
        if (key.equals(p.key)) return p ; 
      return null ;
    }

  /* Les trois méthodes de Map.Entry<String,Integer>
     NB: Un objet Map.Entry est tout bêtement une paire */

    public Integer setValue(Integer v) {
      throw new UnsupportedOperationException("setValue") ;
    }

    public Integer getValue() { return this.val ; }

    public String getKey() { return this.key ; }
    
  }
