Изменения
→Проверка через BFS
for(i = a..z)
if(!used1[automata1[u][i]] || !used2[automata2[v][i]])
q.push( <automata1[u][i], automata2[v][i]>);
used1[automata1[u][i]] = used2[automata2[v][i]] = true;
return true;