s = eval(input())

n = len(s)

cnt = 0



for i in range(n//2):

    if s[i] != s[n-i-1]:

        cnt += 1

        

print(cnt)
s = eval(input())

n = len(s)

count = 0



for i in range(n // 2):

    if s[i] != s[n - i - 1]:

        count += 1

        

print(count)
s = eval(input())
n = len(s)
cnt = 0
for i in range(n // 2):
    if s[i] != s[n - i - 1]:
        cnt += 1
print(cnt)

s = eval(input())
n = len(s)
count = 0
for i in range(n // 2):
    if s[i] != s[n - i - 1]:
        count += 1
print(count)

-cnt = 0 +count = 0 -        cnt += 1 -print(cnt) +        count += 1 +print(count)