while True: try: a = input() b = [] mark = [] for i in range(len(a)): if a[i] == """: mark.append(i) if len(mark) == 0: b = a.split() else: j = 0 k = 0 if len(mark) % 2 != 0: mark = mark[:-1] while j < len(mark): m = mark[j] - k n = mark[j+1] - k b.extend(a[0:m].split()) b.append(a[m+1:n]) a = a[n+1:] k += n+1 j += 2 b.extend(a.split()) print(len(b)) print("\n".join(b)) except: break