Only the first and last letters must be in the right place

Source code