s=eval(input())

ans=0

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

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

        ans+=1

print(ans)
s = eval(input())

ans = 0

for f, b in zip(s, s[::-1]):

    if f!=b:

        ans+=1

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

s = eval(input())
ans = 0
for f, b in zip(s, s[::-1]):
    if f != b:
        ans += 1
print((ans // 2))

-for i in range(len(s) // 2): -    if s[i] != s[-i - 1]: +for f, b in zip(s, s[::-1]): +    if f != b: -print(ans) +print((ans // 2))