S = input()
n = len(S)
A = [S[0]]
B = [S[0:2]]
i = 0
j = 0
while i< n-1:
  if A[j] != S[i+1]:
    A.append(S[i+1])
    i += 1
    j+=1
  else:
    A.append(S[i+1:i+3])
    i += 2
    j += 1
i = 1
j = 0
while i< n-1:
  if B[j] != S[i+1]:
    B.append(S[i+1])
    i += 1
    j+=1
  else:
    B.append(S[i+1:i+3])
    i += 2
    j += 1
if A[-1] ==A[-2]:
  del A[-1]
if B[-1] == B[-2]:
  del B[-1]
print(A, B)
print(max(len(A), len(B)))