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())

t = s[::-1]

ans = 0

for i in range(len(s)):

  if s[i]!=t[i]:

    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())
t = s[::-1]
ans = 0
for i in range(len(s)):
    if s[i] != t[i]:
        ans += 1
print((ans // 2))

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