procedure main() s:=&digits while s:=s[n:=find(reads(),s)]||s[1:n]||s[2+writes(n-1):0] end