#K66367. Increase to Target String

    ID: 32405 Type: Default 1000ms 256MiB

Increase to Target String

Increase to Target String

Given two strings \(S\) and \(T\) of equal length consisting of lowercase English letters, increment each character from \(S\) until it matches the corresponding character in \(T\) using cyclic increments. Specifically, for each position \(i\), you need to compute the smallest non-negative integer \(d_i\) such that

\( (\text{ord}(S_i) + d_i) \mod 26 = \text{ord}(T_i) \mod 26 \)

where ord(c) denotes the ASCII code of character \(c\). Output the resulting list of increments as space-separated integers.

Note: The modulo operation is defined as \(a \mod m = (a % m + m) \mod m\) to ensure a non-negative result.

inputFormat

The input consists of two lines from standard input. The first line contains the string \(S\) and the second line contains the string \(T\). It is guaranteed that \(|S| = |T|\) and both strings consist only of lowercase English letters.

outputFormat

Output a single line with the space-separated list of integers representing the number of increments required for each corresponding character to transform \(S\) into \(T\).

## sample
abc
bcd
1 1 1