<>;substr$_=<>,$`-<>=~/.$/,1,$&;print