Using a for loop to replace letters