# your code goes here
x <- "rti"
sub("(\\S)$", "\\1 ", x)