//a->b1b2b3b4....bn,(ab1b2...bn)->abnab(n-1)....ab2ab1a//B->tAdA,A->sae//link,StackE需要对象不能是基本类型importjava.util.*;classLanguage{staticStringcharB="tsaedsae";staticStringcharA="sae";Scannerreader=newScanner(System.in);Stringcin;Stackopen=newSt