directed graph for letters