Caesar's cipher is one of the simplest and most widely known encryption techniques. It is a type of substitution cipher in which each letter in the plaintext is replaced by a letter some fixed number of positions down the alphabet. For example, with a left shift of 3, D would be replaced by A, E would become B, and so on. The method is named after Julius Caesar, who used it in his private correspondence.

The cipher illustrated here uses a left shift of 3,
so that each occurrence of E in the plaintext becomes B in the ciphertext.
(https://en.wikipedia.org/wiki/Caesar_cipher)
In this problem, several lines of plaintext made of only uppercases and spaces are given, and you have to determine what is the correct left shift to make the first letter to be 'A'. Then you have to use the same left shift to generate the ciphertext.
Hint:
The input is the plaintext. There are several lines of input. All the characters shoud only be one of 'A'-'Z', spaces, and newline('\n') symbols.
There are at most 10 lines, and each line contains less than 100 characters.
The first character must be an alphabet.
Print the ciphertext. You should find out the correct shift to make the first character be an 'A'.