S = input().strip()

n = len(S)

cnt = 0

for i in range(n//2):

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

        cnt += 1

print(cnt)
S = input().strip()

N = len(S)

cnt = 0

for i in range(N//2):

    if S[i]!=S[N-1-i]:

        cnt += 1

print(cnt)
S = input().strip()
n = len(S)
cnt = 0
for i in range(n // 2):
    if S[i] != S[-(i + 1)]:
        cnt += 1
print(cnt)

S = input().strip()
N = len(S)
cnt = 0
for i in range(N // 2):
    if S[i] != S[N - 1 - i]:
        cnt += 1
print(cnt)

-n = len(S) +N = len(S) -for i in range(n // 2): -    if S[i] != S[-(i + 1)]: +for i in range(N // 2): +    if S[i] != S[N - 1 - i]: