I tried to solve if a grammar is ambiguosambiguous or not. I know that I have to find a word that can be generate by two different leftmost derivations. Is there any algorithm to find a word that, if the grammar is ambiguosambiguous, can be generated by two different trees? This question is different.