S = eval(input())

l = len(S)

i = 0

cnt = 0

while i < l/2 :

    if S[i] != S[l-1-i]:

        cnt += 1

    i += 1

print(cnt)

S = eval(input())

l = len(S)

i = 0

hug = 0

while l/2 > i:

    if S[i] != S[l-1-i]:

        hug += 1

    i += 1

print(hug)
S = eval(input())
l = len(S)
i = 0
cnt = 0
while i < l / 2:
    if S[i] != S[l - 1 - i]:
        cnt += 1
    i += 1
print(cnt)

S = eval(input())
l = len(S)
i = 0
hug = 0
while l / 2 > i:
    if S[i] != S[l - 1 - i]:
        hug += 1
    i += 1
print(hug)

-cnt = 0 -while i < l / 2: +hug = 0 +while l / 2 > i: -        cnt += 1 +        hug += 1 -print(cnt) +print(hug)