$_=<>; for(/./g){ if(!y/a-m//){ print"Impossible"; exit; } if($h{$_}++){ $x=1; } } if($x){ print grep!$h{$_},a..'m'; }else{ print join$/,a..'m'; }