Boboniu define bnstring string s character B NYou perform follow operation BNstring s Remove character s remove substre BN NB s add character B n end s add string BN NB end s note string substre string b obtain b deletion possibly zero character begin possibly zero character endboboniu think BNstrings s t similar st there exist permutation p_1 p_2 ldot p_s 1le ile s s_p_it_i Boboniu define textdistst distance s t minimum number operation make s similar tNow Boboniu give n nonempty BNstrings s_1s_2ldot s_n ask find nonempty BNstring t maximum distance string s minimized ie need minimize max_i1n textdists_it