s = eval(input())

res = 0

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

    res += int(s[i] != s[len(s)-i-1])

print(res)

s = eval(input())

l1 = []

for x in s:

    l1.append(x)

l2 = l1[:]

l2.reverse()

hugs = 0

for count in range(int(len(l1)/2)):

    if l1[count] == l2[count]:

        continue

    else:

        hugs += 1

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

s = eval(input())
l1 = []
for x in s:
    l1.append(x)
l2 = l1[:]
l2.reverse()
hugs = 0
for count in range(int(len(l1) / 2)):
    if l1[count] == l2[count]:
        continue
    else:
        hugs += 1
print(hugs)

-res = 0 -for i in range(len(s) // 2): -    res += int(s[i] != s[len(s) - i - 1]) -print(res) +l1 = [] +for x in s: +    l1.append(x) +l2 = l1[:] +l2.reverse() +hugs = 0 +for count in range(int(len(l1) / 2)): +    if l1[count] == l2[count]: +        continue +    else: +        hugs += 1 +print(hugs)