t=disp(l=fgetl(0)); [i]=strchr(l,"T"); do disp(l);until [t]=strchr(fgets(0),"K") disp([repmat([' '],1,t),repmat(['*'],1,i-t)])