anchor.diff:  palindrome(W) -> palindrome(W,"","","").
   palindrome([{W,{N,symmetry}}|T], L, C, R) ->
       NC = if (N rem 2 == 1) and ((C == "") or (W < C)) -> W; true -> C end,
  -    P = string:copies(W, N div 2),
  -    palindrome(T, string:concat(L, P), NC, string:concat(P, R));
  +    P = copies(W, N div 2),
  +    palindrome(T, concat(L, P), NC, concat(P, R));
   palindrome([{W,{N,WR}}|T], L, C, R) ->
  -    P = string:copies(W, N div 2),
  -    PR = string:copies(WR, N div 2),
  -    palindrome(T, string:concat(L, P), C, string:concat(PR, R));
  -palindrome([], L, C, R) -> string:concat(L, string:concat(C, R)).
  +    P = copies(W, N div 2),
  +    PR = copies(WR, N div 2),
  +    palindrome(T, concat(L, P), C, concat(PR, R));
  +palindrome([], L, C, R) -> concat(L, concat(C, R)).
       
   
   mapping(W) -> mapping(W, map_new()).
   mapping([], M) -> M;
   mapping([H|T], M) ->
  -    R = lists:reverse(H),
  +    R = reverse(H),
       {K, KR} = case comp(H, R) of
               eq -> {H, symmetry};
               lt -> {H, R};
  
positive.code: -module(main).
  -export([main/1]).
  
  main(_) ->
      [N|W] = getlines(),
      io:format("~s",[solve(W)]),
      init:stop().
  
  solve(W) ->
      M = mapping(W),
  
negative.code: %% 複数行取得、文字列連結にならんようにタプルで囲む
  getlines() -> getlines([]).
  getlines(Result) ->
      case get_line("") of
          eof -> Result;
          {error, X} -> {error, X};
          W -> getlines(Result ++ [delete($\n,W)])
      end.
  