S = list(eval(input()))

A = list(reversed(S))

LEN=len(S)

ans=0

if LEN%2==0:

    for i in range(LEN//2):

        if S[i]!=A[i]:

            ans+=1

else:

    for i in range((LEN-1)//2):

        if S[i]!=A[i]:

            ans+=1

print(ans)
S = list(eval(input()))

R = list(reversed(S))

ans = 0

for i in range(len(S)):

    if S[i] != R[i]:

        ans += 1

print((ans//2))
S = list(eval(input()))
A = list(reversed(S))
LEN = len(S)
ans = 0
if LEN % 2 == 0:
    for i in range(LEN // 2):
        if S[i] != A[i]:
            ans += 1
else:
    for i in range((LEN - 1) // 2):
        if S[i] != A[i]:
            ans += 1
print(ans)

S = list(eval(input()))
R = list(reversed(S))
ans = 0
for i in range(len(S)):
    if S[i] != R[i]:
        ans += 1
print((ans // 2))

-A = list(reversed(S)) -LEN = len(S) +R = list(reversed(S)) -if LEN % 2 == 0: -    for i in range(LEN // 2): -        if S[i] != A[i]: -            ans += 1 -else: -    for i in range((LEN - 1) // 2): -        if S[i] != A[i]: -            ans += 1 -print(ans) +for i in range(len(S)): +    if S[i] != R[i]: +        ans += 1 +print((ans // 2))