시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
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
W3sicHJvYmxlbV9pZCI6IjMxMjkiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWMwYzFcdWJjOTRcdWM3NzRcdWM3NTggXHVjNzQwXHViYzAwX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