
# slower version:

s = input()
for i in range(len(s)):
  if i%2 == 0:
    print(s[i], end = '')


# optimized version of the same code:

s = input()
ans = ''
for i in range(len(s)):
  if i % 2 == 0:
    ans += s[i]
print(ans)



# slower version:

s = eval(input())



cnt = 0

ans = 0

for c in s:

    if c == 'B':

        cnt += 1

    elif c == 'W':

        ans += cnt

print(ans)


# optimized version of the same code:

s = eval(input())



ans = 0

b = 0

for ss in s:

    if ss == 'W':

        ans += b

    else:

        b += 1

print(ans)

s = eval(input())
cnt = 0
ans = 0
for c in s:
    if c == "B":
        cnt += 1
    elif c == "W":
        ans += cnt
print(ans)

s = eval(input())
ans = 0
b = 0
for ss in s:
    if ss == "W":
        ans += b
    else:
        b += 1
print(ans)

-cnt = 0 -for c in s: -    if c == "B": -        cnt += 1 -    elif c == "W": -        ans += cnt +b = 0 +for ss in s: +    if ss == "W": +        ans += b +    else: +        b += 1