# initialize variables # Loop # Display menu and choose item # Process menu item: # a: add son/father pair # d: delete son/father pair # e: exit # g: get a father # o: output hash neatly # r: replace a father # x: get a grandfather