function [ w, p ] = tetrabolo_word ( index )

%*****************************************************************************80
%
%% tetrabolo_word() returns the boundary word of tetrabolo 1 through 14.
%
%  Discussion:
%
%    There are two distinct naming schemes for the tetraboloes,
%    associated with Martin Gardner and Erich Friedman.  
%
%     #  Gardner  Friedman
%     --------------------
%     1  A        i
%     2  B        o
%     3  C        a
%     4  D        c
%     5  E        y
%     6  F        s
%     7  G        v
%     8  H        l
%     9  I        z
%    10  J        j
%    11  K        k
%    12  L        d
%    13  M        r
%    14  N        g
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    08 December 2021
%
%  Author:
%
%    John Burkardt
%
%  Reference:
%
%    Erich Friedman,
%    Math Magic, Problem of the month, September 2004,
%    https://erich-friedman.github.io/mathmagic/0904.html.
%
%    Martin Gardner, 
%    Mathematical Games: 
%    The polyhex and the polyabolo, polygonal jigsaw puzzle pieces,
%    Scientific American,
%    Volume 216, June 1967, pages 124-132.
%
%  Input:
%
%    integer INDEX, a value between 1 and 14.
%
%  Output:
%
%    character W, the boundary word
%
%    integer P(1,2), the base point.
%
  p = [ 0, 0 ];

  if ( index == 1 )
    w = 'AACEEG';
  elseif ( index == 2 )
    w = 'HBDF';
  elseif ( index == 3 )
    w = 'AADDGG';
  elseif ( index == 4 )
    w = 'ACDEHG';
  elseif ( index == 5 )
    w = 'ABECFG';
  elseif ( index == 6 )
    w = 'AHBEDF';
  elseif ( index == 7 )
    w = 'ABDEHF';
  elseif ( index == 8 )
    w = 'ABBEFF';
  elseif ( index == 9 )
    w = 'AABEEF';
  elseif ( index == 10 )
    w = 'ABADFF';
  elseif ( index == 11 )
    w = 'ABEDGG';
  elseif ( index == 12 )
    w = 'AAADEF';
  elseif ( index == 13 )
    w = 'ACADFG';
  elseif ( index == 14 )
    w = 'ABDFAF';
  else
    fprintf ( 1, '\n' );
    fprintf ( 1, 'tetrabolo_word(): Fatal error!\n' );
    fprintf ( 1, '  1 <= index <= 14 is required!\n' );
    error ( 'tetrabolo_word(): 1 <= index <= 14 required!' );
  end

  return
end

