changed output dawg format

the end node is now always the first node (with index 0)