시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 12 9 9 75.000%

문제

상범이는 민균이의 페이스북 비밀번호를 알아냈다. 상범이는 민균이의 페이스북을 털기 위해, 민균이의 옆에 있는 태욱이에게 부탁하려고 한다. 그래서 비밀번호를 태욱이에게 메세지로 보내려고 한다. 상범이는 민균이가 메세지를 훔쳐보는 것을 막기 위해 메세지를 additional key 암호화 기법을 이용하여 암호화를 하려고 한다. 문자와 키는 알파벳으로 이루어진 문자열이다. 암호화 방법은 아래와 같다.

  1. 키는 메세지와 길이가 같아질 때까지 반복된다.
  2. 키와 메세지의 각 문자들은 0과 25사이의 수로 표현된다. ('a' = 0, 'b'=1, ..., 'z'=25)
  3. 메세지의 각 문자들은 키의 대응되는 문자들과 더해진다. 만약 결과가 26이 넘는다면 해당 결과에서 26을 빼어 0과 25 사이의 수로 만들어야 한다.
  4. 결과는 문자열로 표현된다.

예를 들면, 메세지가 "sutraujutro"이고 키가 "abz"라면 "svsrbtjvsrp"라는 결과를 얻을 수 있다.

민균이는 암호화기법을 알고 있다. 민균이는 상범이의 암호화되기 전의 메세지의 일부분을 엿보았지만 정확히 어느 부분인지는 알지 못한다. 엿본 메세지의 일부분의 길이는 항상 키의 길이의 2배이상이다.

민균이가 암호화된 메세지를 해독할 수 있도록 도와주자. 암호화된 메세지와 암호화되지 않은 메세지의 일부분을 알고 있을때, 원래의 메세지가 무엇인지 알아내자.

입력

입력의 첫번째 줄은 암호화된 메세지가 주어진다. 메세지의 길이는 최대 1000이고 소문자로 이루어져 있다.

두번째 줄은 암호화되지 않은 메세지의 일부분이 주어진다. 길이는 최대 100이고 소문자로 이루어져 있다.

출력

암호화되기 전의 메세지를 출력해라.

예제 입력 1

psinottfn
most

예제 출력 1

primosten
W3sicHJvYmxlbV9pZCI6IjMxMjkiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWMwYzFcdWJjOTRcdWM3NzRcdWM3NTggXHVjNzQwXHViYzAwXHV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