compare first and last letters