First part of the Vigenère cipher problem