s=eval(input())

n=len(s)

c=0

for i in range(n-1):

    if i >= n-1-i:

        break

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

        c+=1

print(c)
s=list(eval(input()))

c = 0

for i in range(len(s)//2):

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

        c+=1

print(c)
s = eval(input())
n = len(s)
c = 0
for i in range(n - 1):
    if i >= n - 1 - i:
        break
    if s[i] != s[n - 1 - i]:
        c += 1
print(c)

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

-s = eval(input()) -n = len(s) +s = list(eval(input())) -for i in range(n - 1): -    if i >= n - 1 - i: -        break -    if s[i] != s[n - 1 - i]: +for i in range(len(s) // 2): +    if s[i] != s[-1 - i]: