s = eval(input())

cnt = 0

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

    if s[i] != s[-(i + 1)]:

        cnt += 1

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

cnt = 0

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

    if a != b:

        cnt += 1

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

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

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