anchor.diff:  -import(lists,[reverse/1,max/1]).
   
   main(_) ->
  -    [N|W] = tokens(get_chars("",20000)," \n"),
  +    [_|W] = tokens(get_chars("",20000)," \n"),
       format("~s",[solve(W)]),
       halt().
   
   solve(W) ->
       M = mapping(W),
  -    palindrome(M, map_data(M)).
  +    palindrome(M, map_enumerator(M)).
   
   palindrome(M, W) -> palindrome(M, W, "", "", "").
   
  -palindrome(_, [], L, C, R) -> concat(L, concat(C, R));
  -palindrome(M, [{H, V}|T], L, C, R) ->
  +palindrome(_, noitem, L, C, R) -> concat(L, concat(C, R));
  +palindrome(M, E, L, C, R) ->
  +    {H, V} = enumerator_get(E),
  +    T = enumerator_next(E),
       HR = reverse(H),
       case comp(H, HR) of
           gt -> palindrome(M, T, L, C, R);
  
positive.code:     end;
  map_put(NK,NV, emptymap) -> {map, {NK, NV}, emptymap, emptymap, 1}.
  
  
  
  map_rotate({map, KV, L, R, _}) ->
      LD = map_depth(L),
      RD = map_depth(R),
  
negative.code: % キーはリスト(文字列)限定
  % 値は何でもOK
  % 機能は空マップ生成、キーによる値の配置と参照、
  % および全データの列挙のみ
  %  空マップ生成 map_new() -> map
  %  配置         map_put( key, value, map ) -> map
  %  参照         map_get( key, map ) -> {ok, value } or nothing
  %  全データ列挙 map_enumerator( map ) -> enumerator or noitem
  %   キーと値を取得 enumerator_get( enumerator ) -> { key, value } or nothing
  %   次のデータ     enumerator_next( enumerator ) -> enumerator or noitem
  
  comp([],[]) -> eq;
  comp(_,[]) -> gt;
  