Type some words separated by spaces in the input field below and watch the diagram change in real time!
Each blue edge connects a node to its suffix in the trie, if it exists. Each green edge connects a node to its largest suffix that is a valid word, i.e. if you follow the blue edges upwards until you reach encounter the first node that is blue and not grey, you would have found the node connected via the green edge.
To save the image, simply copy the SVG code from below, paste it into your favourite text editor, and save it as an SVG file, for example,