let denote function fs take string s consist lowercase latin letter dot return string consist lowercase Latin letter follow let r string process character s leave right for character c follow c lowercase latin letter append c end stre r delete character r r delete character function crash return r result function you give string s t you delete minimum possible number character s fs t function crash Note are not allow insert new character s reorder exist one