# Task
 John loves encryption. He can encrypt any string by the following algorithm:
```
take the first and the last letters of the word;
replace the letters between them with their number;
replace this number with the sum of it digits 
          until a single digit is obtained.```
Given two strings(`s1` and `s2`), return `true` if their encryption is the same, or `false` otherwise.
# Example
 For `s1 = "EbnhGfjklmjhgz" and s2 = "Eabcz"`, the result should be `true`.
 ```
 "EbnhGfjklmjhgz" --> "E12z" --> "E3z"
 "Eabcz" --> "E3z"
 Their encryption is the same.```
# Input/Output
 - `[input]` string `s1`
  The first string to be encrypted.
  `s1.length >= 3`
 - `[input]` string `s2`
  The second string to be encrypted.
  `s2.length >= 3`
 - `[output]` a boolean value
 `true` if encryption is the same, `false` otherwise.
from string import ascii_lowercase as alphabet

def same_encryption(s1, s2):
    sum_s1 = len(s1[1:-1])
    sum_s2 = len(s2[1:-1])
    while len(str(sum_s1)) > 1:
        sum_s1 = sum(map(int, str(sum_s1)))
    while len(str(sum_s2)) > 1:
        sum_s2 = sum(map(int, str(sum_s2)))
    return '{}{}{}'.format(s1[0], sum_s1, s1[-1]) == '{}{}{}'.format(s2[0], sum_s2, s2[-1])
from string import ascii_lowercase as alphabet

def same_encryption(s1, s2):
    sum_s1 = len(s1[1:-1])
    sum_s2 = len(s2[1:-1])
    while len(str(sum_s1)) > 1:
        sum_s1 = sum(map(int, str(sum_s1)))
    while len(str(sum_s2)) > 1:
        sum_s2 = sum(map(int, str(sum_s2)))
    return '{}{}{}'.format(s1[0], sum_s1, s1[-1]) == '{}{}{}'.format(s2[0], sum_s2, s2[-1])