Added code for finding order of characters in language