character*50::S integer::t,u,length read*, S,t,u length = LEN_TRIM(S) t = t+1 u = u+1 if(t.eq.u) then S(t:length-1) = S(t+1:length) S(length:length)='' else if(t.lt.u) then S(t:length-1) = S(t+1:length) S(u-1:length-2) = S(u:length-1) else S(u:length-1) = S(u+1:length) S(t-1:length-2) = S(t:length-1) end if S(length-1:length)='' end if print '(a)',S end program