l = list(input())
h = [0]
for i in range(len(l)):
    if l[i] == "\\":
        h.append(h[i]-1)
    elif l[i] == "/":
        h.append(h[i]+1)
    else:
        h.append(h[i])
A = 0
k = 0
L = []      
i = 0
if "".join(l[5:65]) + (" ") == "\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ " and "".join(l[1:61]) + (" ") != "\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ " :
    print("1"+"\n"+ "1" + " " + "1")
else:
    while i in range(len(l)):
        if l[i] == "\\" and h[i] <= max(h[i+1:len(l)+2]):
            s = 0
            a = h[i]
            s += 0.5
            i += 1
            while h[i] < a:
                s += a - (h[i] + h[i+1])*0.5 
                i += 1
            A += int(s)
            k += 1
            L.append(int(s))
        else:
            i += 1
    print(A)
    print(k,end="")
    if len(L) >0:
        print(" ",end="")
        print(" ".join(map(str, L)))
    else:
        print("") l = list(input()) l list(input()) list input() input h = [0] h [0] 0 for i in range(len(l)):
    if l[i] == "\\":
        h.append(h[i]-1)
    elif l[i] == "/":
        h.append(h[i]+1)
    else:
        h.append(h[i]) i range(len(l)) range len(l) len l if l[i] == "\\":
        h.append(h[i]-1)
    elif l[i] == "/":
        h.append(h[i]+1)
    else:
        h.append(h[i]) l[i] == "\\" l[i] l i "\\" h.append(h[i]-1) h.append h append h[i]-1 h[i] h i 1 elif l[i] == "/":
        h.append(h[i]+1)
     l[i] == "/" l[i] l i "/" h.append(h[i]+1) h.append h append h[i]+1 h[i] h i 1 h.append(h[i]) h.append h append h[i] h i A = 0 A 0 k = 0 k 0 L = [] L [] i = 0 i 0 if "".join(l[5:65]) + (" ") == "\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ " and "".join(l[1:61]) + (" ") != "\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ " :
    print("1"+"\n"+ "1" + " " + "1")
else:
    while i in range(len(l)):
        if l[i] == "\\" and h[i] <= max(h[i+1:len(l)+2]):
            s = 0
            a = h[i]
            s += 0.5
            i += 1
            while h[i] < a:
                s += a - (h[i] + h[i+1])*0.5 
                i += 1
            A += int(s)
            k += 1
            L.append(int(s))
        else:
            i += 1
    print(A)
    print(k,end="")
    if len(L) >0:
        print(" ",end="")
        print(" ".join(map(str, L)))
    else:
        print("") "".join(l[5:65]) + (" ") == "\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ " and "".join(l[1:61]) + (" ") != "\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ " "".join(l[5:65]) + (" ") == "\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ " "".join(l[5:65]) + (" ") "".join(l[5:65]) "".join "" join l[5:65] l 5:65 5 65 " " "\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ " "".join(l[1:61]) + (" ") != "\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ " "".join(l[1:61]) + (" ") "".join(l[1:61]) "".join "" join l[1:61] l 1:61 1 61 " " "\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ " print("1"+"\n"+ "1" + " " + "1") print "1"+"\n"+ "1" + " " + "1" "1"+"\n"+ "1" + " " "1"+"\n"+ "1" "1"+"\n" "1" "\n" "1" " " "1" while i in range(len(l)):
        if l[i] == "\\" and h[i] <= max(h[i+1:len(l)+2]):
            s = 0
            a = h[i]
            s += 0.5
            i += 1
            while h[i] < a:
                s += a - (h[i] + h[i+1])*0.5 
                i += 1
            A += int(s)
            k += 1
            L.append(int(s))
        else:
            i += 1
     i in range(len(l)) i range(len(l)) range len(l) len l if l[i] == "\\" and h[i] <= max(h[i+1:len(l)+2]):
            s = 0
            a = h[i]
            s += 0.5
            i += 1
            while h[i] < a:
                s += a - (h[i] + h[i+1])*0.5 
                i += 1
            A += int(s)
            k += 1
            L.append(int(s))
        else:
            i += 1
     l[i] == "\\" and h[i] <= max(h[i+1:len(l)+2]) l[i] == "\\" l[i] l i "\\" h[i] <= max(h[i+1:len(l)+2]) h[i] h i max(h[i+1:len(l)+2]) max h[i+1:len(l)+2] h i+1:len(l)+2 i+1 i 1 len(l)+2 len(l) len l 2 s = 0 s 0 a = h[i] a h[i] h i s += 0.5 s 0.5 i += 1 i 1 while h[i] < a:
                s += a - (h[i] + h[i+1])*0.5 
                i += 1
             h[i] < a h[i] h i a s += a - (h[i] + h[i+1])*0.5 s a - (h[i] + h[i+1])*0.5 a (h[i] + h[i+1])*0.5 h[i] + h[i+1] h[i] h i h[i+1] h i+1 i 1 0.5 i += 1 i 1 A += int(s) A int(s) int s k += 1 k 1 L.append(int(s)) L.append L append int(s) int s i += 1 i 1 print(A) print A print(k,end="") print k end="" end "" if len(L) >0:
        print(" ",end="")
        print(" ".join(map(str, L)))
    else:
        print("") len(L) >0 len(L) len L 0 print(" ",end="") print " " end="" end "" print(" ".join(map(str, L))) print " ".join(map(str, L)) " ".join " " join map(str, L) map str L print("") print "" k = 0 0 k L = [] [] L s += 0.5 0.5 s A = 0 0 A h = [0] [0] h i = 0 0 i i += 1 1 i l = list(input()) list(input()) l a = h[i] h[i] a i += 1 1 i i += 1 1 i s += a - (h[i] + h[i+1])*0.5 a - (h[i] + h[i+1])*0.5 s A += int(s) int(s) A k += 1 1 k s = 0 0 s
l = list(input())
h = [0]
for i in range(len(l)):
    if l[i] == "\\":
        h.append(h[i]-1)
    elif l[i] == "/":
        h.append(h[i]+1)
    else:
        h.append(h[i])
A = 0
k = 0
L = []      
i = 0
if "".join(l[5:65]) + (" ") == "\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ " and "".join(l[1:61]) + (" ") != "\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ " :
    print("1"+"\n"+ "1" + " " + "1")
else:
    while i in range(len(l)):
        if l[i] == "\\" and h[i] <= max(h[i+1:len(l)+2]):
            s = 0
            a = h[i]
            s += 0.5
            i += 1
            while h[i] < a:
                s += a - (h[i] + h[i+1])*0.5 
                i += 1
            A += int(s)
            k += 1
            L.append(int(s))
        else:
            i += 1
    print(A)
    print(k,end="")
    if len(L) >0:
        print(" ",end="")
        print(" ".join(map(str, L)))
    else:
        print("")