Problem:


Score : 200 points

Problem Statement

Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has 3 keys on it: the 0 key, the 1 key and the backspace key.

To begin with, he is using a plain text editor with this keyboard. This editor always displays one string (possibly empty). Just after the editor is launched, this string is empty. When each key on the keyboard is pressed, the following changes occur to the string:

The 0 key: a letter 0 will be inserted to the right of the string.

The 1 key: a letter 1 will be inserted to the right of the string.

The backspace key: if the string is empty, nothing happens. Otherwise, the rightmost letter of the string is deleted.

Sig has launched the editor, and pressed these keys several times. You are given a string s, which is a record of his keystrokes in order. In this string, the letter 0 stands for the 0 key, the letter 1 stands for the 1 key and the letter B stands for the backspace key. What string is displayed in the editor now?

Constraints

1 ≦ |s| ≦ 10 (|s| denotes the length of s)

s consists of the letters 0, 1 and B.

The correct answer is not an empty string.

Input

The input is given from Standard Input in the following format:

s

Output

Print the string displayed in the editor in the end.

Sample Input 1

01B0

Sample Output 1

00

Each time the key is pressed, the string in the editor will change as follows: 0, 01, 0, 00.

Sample Input 2

0BB1

Sample Output 2

1

Each time the key is pressed, the string in the editor will change as follows: 0, (empty), (empty), 1.



Sample input:
01B0


Sample output:
00

Submission status: Wrong Answer

Solution code:
list=input().split()
l=len(list)
output=""
for i in range(l):
	if list[i]=="0" or "1":
		output=output+list[i]
	else:
		if i!=0:
			output=output-list[i-1]
print(output)

Submission status: Wrong Answer

Solution code:
words = str(input())
ans = ""
for i in range(len(words)):
  if words[i] == "0":
    ans +="0"
  elif words[i] == "1":
    ans +="1"
  else:
    ans=ans.rstrip()
print(ans)

Submission status: Wrong Answer

Solution code:
a = []
for c in input():
    if c in '01':
        a.append(c)
    else:
        a = a[:-1]
print(a)

Submission status: Wrong Answer

Solution code:
S = input()
keybord = [s for s in S]
editor = ''
for i in range(len(S)):
    if keybord[i] == '0':
        editor += '0'
    elif keybord[i] == '1':
        editor += '1'
    else:
        if editor == '':
            continue
        else:
            editor = editor[:-1]

Submission status: Wrong Answer

Solution code:
s=list(input())
res=""
for i in range(len(s)):
    if s[i]=='0' or s[i]=='1':
        res+=s[i]
    else:
        res=res[:i-1]
print(res)

Submission status: Wrong Answer

Solution code:
s = input()
d = 0
for i in s[::-1]:
    if i == 'B':
        d += 1
    elif d > 0:
        d -= 1
    else:
        print(i, end='')

Submission status: Wrong Answer

Solution code:
def main():
    s = input()
    ans = []
    for op in s:
        if op == '0':
            ans.append(op)
        elif op == '1':
            ans.append(op)
        else:
            if len(ans) > 0:
                ans.pop()
    print(*ans)
if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
s = list(input())
ans = ""
for i in s:
  if i == "0":
    ans += "0"
  elif i == "1":
    ans += "1"
  elif i == "B" and len(ans) == 1:
    ans = ""
  elif i == "B" and len(ans) != 0:
    ans = ans[:1]

print("{}".format(ans))

Submission status: Wrong Answer

Solution code:
a = list(input())
for i in range(len(a)):
    if a[i] == "B":
        if i > 0:
            a[i] = ""
            for j in range(i-1, -1, -1):
                if a[j] != "":
                    a[j] = ""
                    break
print("".join(a))

Submission status: Wrong Answer

Solution code:
a = list(input())
for i in range(len(a)):
    if a[i] == "B":
        if i > 0:
            a[i] = ""
            for j in range(i-1, -1, -1):
                if a[j] != "":
                    a[j] = ""
                    exit()
print("".join(a))

Submission status: Wrong Answer

Solution code:
a = list(input())
for i in range(len(a)):
    if a[i] == "B":
        if i > 0:
            a[i-1] = ""
            a[i] = ""
print("".join(a))

Submission status: Wrong Answer

Solution code:
s = list(input())
str = ""
for i in range(len(s)):
    if s[i] == "0":
        str += "0"
    if s[i] == "1":
        str += "1"
        print(str)
    if s[i] == "B":
        if str == "":
            continue
        else:
            str = str[:-1]
print(str)

Submission status: Wrong Answer

Solution code:
s = list(input())
str = ""
for i in range(len(s)):
    if s[i] == "0":
        str += "0"
    if s[i] == "1":
        str += "1"
        print(str)
    if s[i] == "B":
        if str == "":
            continue
        else:
            str = str[:i-2]
print(str)

Submission status: Wrong Answer

Solution code:
s = list(input())
str = ""
for i in range(len(s)):
    if s[i] == "0":
        str += "0"
    if s[i] == "1":
        str += "1"
    if s[i] == "B":
        if str != "":
            str = str[:i-1]
        else:
            continue
print(str)

Submission status: Wrong Answer

Solution code:
s = list(input())
str = ""
for i in range(len(s)):
    if s[i] == "0":
        str += "0"
    if s[i] == "1":
        str += "1"
    if s[i] == "B":
        if str != "":
            str = str[:i-1]
        else:
            str = str
print(str)

Submission status: Wrong Answer

Solution code:
s = list(input())
str = ""

for i in range(len(s)):
  if s[i] == 'B':
    str = str[0:-2]
  else:
    str += s[i]

print(str)

Submission status: Wrong Answer

Solution code:
S = input()
str = []
print(len(S))
result = ""
flg = 0
for i in range(len(S)):
    if flg == 1:
        flg  = 0
        continue
    if S[len(S)-1 - i] == 'B':
        flg = 1
    else:
        str.append(S[len(S) - 1 - i])
str.reverse()
for i in str:
    result += i
print(result)

Submission status: Wrong Answer

Solution code:
S = input()
str = []
print(len(S))
result = ""
flg = 0
for i in range(len(S)):
    if flg == 1:
        flg  = 0
        continue
    if S[len(S)-1 - i] == 'b':
        flg = 1
    else:
        str.append(S[len(S) - 1 - i])
str.reverse()
for i in str:
    result += i
print(result)

Submission status: Wrong Answer

Solution code:
from sys import stdin
s = (stdin.readline().rstrip())
ans = ""
for i in s:
    if i == "0":
        ans = ans + "0"
    elif i == "1":
        ans = "1" + ans
    elif i == "B" and len(ans) != 0:
        ans = ans[:-1]
print(ans)

Submission status: Wrong Answer

Solution code:
s=input().split('B')
print("".join(list(map(lambda x:x[0:len(x)-1],s[0:len(s)-1])))+s[-1])

Submission status: Wrong Answer

Solution code:
list = map(str, input().split())

ans = []
for i in list:
    if i=="B" and len(ans)!=0:
        ans = ans[0:-1]
    elif i=="0" or i=="1":
        ans = ans.append(i)
print("".join(ans))

Submission status: Wrong Answer

Solution code:
list = map(str, input().split())

ans = []
for i in list:
    if i=="B" and len(ans)!=0:
        ans = ans[0:-1]
    elif i==0 or i==1:
        ans = ans.append(i)
print("".join(ans))

Submission status: Wrong Answer

Solution code:
list = map(str, input().split())

ans = []
for i in list:
    if i=="B" and len(ans)!=0:
        ans = ans[0:-1]
    elif i==0 or i==1:
        ans.append(i)
print("".join(ans))

Submission status: Wrong Answer

Solution code:
list = map(str, input().split())

ans = []
for i in list:
    if i=="B":
        del ans[-1]
    else:
        ans.append(i)
print("".join(ans))

Submission status: Wrong Answer

Solution code:
s = input()
res =[]
for i in range(len(s)):
	print(res)
	if s[i] == 'B':
		if len(res) != 0:
			res.pop(len(res)-1)
		continue
	res.append(s[i])

print("".join(res))

Submission status: Wrong Answer

Solution code:
s = input()
ans = []
for i in s:
    if i == 'B' and len(ans):
        ans.pop()
    else:
        ans.append(i)
print(''.join(ans))

Submission status: Wrong Answer

Solution code:
s=input()
s=s.replace("0B","1B")
s=s.replace("1B","")
s=s.replace("B","")
print(s)

Submission status: Wrong Answer

Solution code:
s = input()

ans = ''
for i in range(1, len(s)):
    if s[i] == 'B':
        continue
    else:
        if s[i - 1] != 'B':
            ans += s[i - 1]
if s[-1] != 'B':
    ans += s[-1]

print(ans)

Submission status: Wrong Answer

Solution code:
s = input()

ans = ''

for i in range(0, len(s) - 1):
    if s[i + 1] != 'B':
        if s[i] != 'B':
            ans += s[i]
else:
    if s[-1] != 'B':
        ans += s[-1]
print(ans)

Submission status: Wrong Answer

Solution code:
s=input()
a=[]
def b(x):
  if len(x)!=0:
    x=x[:len(x)-1]
  return x
for i in range(len(s)):
  if s[i]=='B':
    a=b(a)
  else:
    a.append(s[i])
print(a)

Submission status: Wrong Answer

Solution code:
s = input()
r = []
for i in range(len(s)):
    if s[i] == "0":
        r.append("0")
    elif s[i] == "1":
        r.append("1")
    elif s[0] == "B":
        continue
    elif s[i] == "B" and len(r) != 0:
        del r[-1]
    else:
        continue



print("".join(r))

Submission status: Wrong Answer

Solution code:
N=input()
X=""
for i in range (1,(len(N)-1)):
    if(N[i] is not "B")and(N[i-1] is not "B"):
        X=X+N[i-1]
if(N[len(N)-1] is not "B"):
    X=X+N[len(N)-1]
print(X)

Submission status: Wrong Answer

Solution code:
N=input()
X=""
for i in range (1,(len(N)-1)):
    if(N[i] is not "B"):
        X=X+N[i-1]
if(N[len(N)-1] is not "B"):
    X=X+N[len(N)-1]
print(X)

Submission status: Wrong Answer

Solution code:
N=input()
X=""
for i in range (len(N)):
    if(N[i] is not "B"):
        X=X+N[i]
    else:
        X=X[:i-2]
print(X)

Submission status: Wrong Answer

Solution code:
N=input()
X=""
for i in range (len(N)):
    if(N[i] is not "B"):
        X=X+N[i]
    else:
        X=X[:i-1]
print(X)

Submission status: Wrong Answer

Solution code:
l = list(input())

print(l)
list = []

for i in range(len(l)):
    if l[i] == 'B':
        if not list:
            continue
        else:
            del list[-1]
    else:
        list.append(l[i])

print(''.join(list))

Submission status: Wrong Answer

Solution code:
print(input().replace('0B', '').replace('1B', '').replace('B', ''))

Submission status: Wrong Answer

Solution code:
s=input()
answer=""
for i in range(len(s)):
    if s[i]== '0':
        answer+="0"
    elif s[i]=='1':
        answer+="1"
    elif len(answer)>0:
        print("a")
        answer=answer[:-1]
print(answer)

Submission status: Wrong Answer

Solution code:
s = list(input())
size = len(s)
ans = []
for i in range(size) :
    if s[i] ==  "B" and len(ans) >= 1:
        ans.pop(-1)
    else: ans.append(s[i])

b = "".join(ans)
print(b)

Submission status: Wrong Answer

Solution code:
s=list(input())
for i in range(len(s)):
    if s[i]=="B":
        s[i-1]=""
        s[i]=""
print("".join(s))

Submission status: Wrong Answer

Solution code:
import itertools
S = input()
S = list(S)
ans = [""]
for s in S:
    if s == "B":
        ans[-1] = ""
    else:
        ans.append(s)
print("".join(ans))

Submission status: Wrong Answer

Solution code:
s=input()
n=len(s)
ans=''
for i in range(0,n):
    if s[i]=='0':
        ans+='0'
    elif s[i]=='1':
        ans+='1'
    elif s[i]=='B' and n!=0:
        ans+='B'
        ans=ans.replace(ans[i-1],'B')
print(ans.replace('B',''))

Submission status: Wrong Answer

Solution code:
a = str(input())
s = len(a)
x = ""
while s > 0:
    if a[0] == "0":
        x += "0"
    elif a[0] == "1":
        x += "1"
    else:
        x += "\b"
    s = s - 1
    a = a[1:]
print(x)

Submission status: Wrong Answer

Solution code:
temp = ""

in_keys = input().rstrip()

while(True):

    index = in_keys.find("B")
    if index == -1:
        break
    elif index == 0:
        temp = in_keys[1:]
    else:
        temp = in_keys[:index-1] + in_keys[index+1:]
        #print(in_keys[:index-1],in_keys[index+1:])

    in_keys = temp

print(temp)

Submission status: Wrong Answer

Solution code:
s=input()
S=list(s)
L=len(S)
A=[]
for i in range(L):
    if S[i]=='0' or S[i]=='1':
        A.append(S[i])
    elif S[i]=='B' and len(A)==0:
        A.append('')
    else:
        A.remove(A[-1])
a=''.join(A)
print(a)

Submission status: Wrong Answer

Solution code:
s=input()
S=list(s)
L=len(S)
A=[]
for i in range(L):
    if S[i]=='0' or S[i]=='1':
        A.append(S[i])
    elif S[i]=='B' and len(A)==0:
        continue
    else:
       A.remove(A[-1])
a=''.join(A)
print(a)

Submission status: Wrong Answer

Solution code:
x = input()

for i in range(11):
  x.replace('1B', '')
  x.replace('0B', '')

x.replace('B', '')

print(x)

Submission status: Wrong Answer

Solution code:
s = input()
ans = s
while 'b' in ans:
    ans = ans.lstrip('b').replace('0b', '').replace('1b', '')
print(ans)

Submission status: Wrong Answer

Solution code:
s = input()
print(s.replace('0b', '').replace('1b', '').replace('b', ''))

Submission status: Wrong Answer

Solution code:
s = list(input())
for i in range(len(s)):
    if s[i]  == "B":
        s[i] = "x"
        s[i-1] = "x"

def rmval(arr, val):
    while val in arr:
        arr.remove(val)

rmval(s, "x")
sn = "".join(s)  
print(sn)

Submission status: Wrong Answer

Solution code:
s=input()
s=list(s)
l=[]
ls=len(s)
for i in range (ls):
    if s[i]=='1':
        l.append(1)
    elif s[i]=='0':
        l.append(0)
    else:
        if len(l)==0:
            l=l
        else:
            l.pop()
print(l)

Submission status: Wrong Answer

Solution code:
# -*- coding utf-8 -*-

s=list(input())
ans=""

for i in range(0,len(s),1):
    if s[i]==1 or s[i]==0:
        ans+=ans[i]
    else:
        ans=ans[:-1]

print(ans)

Submission status: Wrong Answer

Solution code:
s=list(input())
a=[]
for i in range(len(s)):
    if s[i]=='1':
        a.append('1')
    if s[i]=='0':
        a.append('0')
    if s[i]=='B':
        if len(a)>0:
            a.remove(a[len(a)-1])
print(''.join(a))

Submission status: Wrong Answer

Solution code:
w = input()
res = []
for i in w:
    print(i,res)
    if i =='1':
        res.append(i)
    elif i == '0':
        res.append(i)
    elif len(res) > 0:
        res.pop()
    else:
        pass
print(''.join(res))

Submission status: Wrong Answer

Solution code:
s = input()
s_list = list(s)
count = s.count('B')
for _ in range(count):
  ind = s_list.index('B')
  if ind > 0:
    s_list[ind-1] = ''
  s_list[ind] = ''
s = ''.join(s_list)
print(s)

Submission status: Wrong Answer

Solution code:
s = input()
s_list = list(s)
count = s.count('B')
for _ in range(count):
  ind = s_list.index('B')
  s_list[ind-1] = ''
s = ''.join(s_list)
s = s.replace('B','')
print(s)

Submission status: Wrong Answer

Solution code:
s = input()
res = ""
for i in range(len(s)):
    if i == len(s) - 1:
        if s[i] != 'B':
            res += s[i]

    elif s[i] != 'B' and s[i+1] != 'B':
        res += s[i]

print(res)

Submission status: Wrong Answer

Solution code:
def b(x):
  if x=='':return''
  else:return x[:-1]
s,ans=input(),''
for i in range(len(s)):
  if s[i]!='B':ans=b(ans)
  else:ans+=s[i]
print(ans)

Submission status: Wrong Answer

Solution code:
# ABC 043 B

S =input()
ANS = ""
for i in range(len(S)):
    if ANS=="" and S[i]=="B":
        ANS = ANS
    elif ANS!="" and S[i]=="B":
        ANS = ANS[0:i-1]
    else:
        ANS+=S[i]
print(ANS)

Submission status: Wrong Answer

Solution code:
# ABC 043 B

S =input()
ANS = ""
for i in range(len(S)):
    if S[i]=="B":
        ANS = ANS[0:i-1]
    else:
        ANS+=S[i]
print(ANS)

Submission status: Wrong Answer

Solution code:
list=list(input())
word=""
for i in list:
  if i=="0":
    word+=i
  elif i=="1":
    word+=i
  else:
    if word=="":
      pass
    else:
      del list[-1]
print(word)

Submission status: Wrong Answer

Solution code:
s = input()
p = ''
for i in range(len(s)):
    if s[i] == 'B':
        if len(p) > 0:
            print(p[:-1])
            p = p[:-1]
    else:
        p += s[i]
print(p)

Submission status: Wrong Answer

Solution code:
s = input()
p = ''
for i in range(len(s)):
    if s[i] == 'B':
        if len(p) != 0:
            p = p[:-1]
    else:
        p += s[i]
print(p[::-1])

Submission status: Wrong Answer

Solution code:
s = input()
p = ''
for i in range(len(s)):
    if s[i] == 'B':
        if i != 0:
            p = p[:-1]
    else:
        p += s[i]
print(p[::-1])

Submission status: Wrong Answer

Solution code:
s=input()
ans=""
for x in s:
  if x == 'B' and len(ans)>0:
    ans=ans[:len(ans)-1]
  else:
    ans+=x
print(ans)

Submission status: Wrong Answer

Solution code:
s = input()
ans = ""

for i in range(len(s)):
  if s[i] == "0" or s[i] == "1":
    ans += s[i]
  elif s[i] == "B":
    ans = ans[:-1]
  print(i,ans)

Submission status: Wrong Answer

Solution code:
s = list(str(input()))
lis = []
a = ""

for i in range(len(s)):
        if s[i] == "B":
                if len(lis) == 0:
                        continue
                else:
                        lis.pop()
        elif s[i] == "1":
                lis.append("1")
        else:
                lis.append("0")

for j in range(len(lis)):
        a = a + lis[j]

print(int(a))

Submission status: Wrong Answer

Solution code:
A=str(input())
A=list(A)
B=[]
for i in A:
  if i=="0":
    B.append("0")
  elif i=="1":
    B.append("1")
  elif i=="B":
    B[:-1]
print(''.join(B))

Submission status: Wrong Answer

Solution code:
s = input()
output = ''
for i in range(len(s)):
    if s[i] == 0:
        output += '0'
    elif s[i] == '1':
        output += '1'
    else:
        if output == '':
            pass
        else:
            output = output[:-1]


print(output)

Submission status: Wrong Answer

Solution code:
s = '0B1BB1'
print(s.replace('0B', '').replace('1B', '').replace('B', ''))

Submission status: Wrong Answer

Solution code:
s = str(input())
l = []
for i in range(len(s)):
  if s[i] == 'B':
    if len(l) != 0:
      l[-1] = ''
  else:
    l.append(s[i])
print(''.join(l))

Submission status: Wrong Answer

Solution code:
s = input()
ans = ''
for i in range(len(s)):
    if s[i] == '0':
        ans += '0'
    elif s[i] == '1':
        ans += '1'
    else:
        ans = ans[:i-1]
print(ans)

Submission status: Wrong Answer

Solution code:
s=''
for c in input():s=s+c*(c<'B')or s[:-1]
print(s)

Submission status: Wrong Answer

Solution code:
s=''
for c in input():s=s[:-1]*(c>'1')or s+c
print(s)

Submission status: Wrong Answer

Solution code:
s=input()
ans=""
for i in s:
  if i==0 or i==1:
    ans+=i
  else:
    if len(ans)!=0:
      del ans[-1]
print(ans)

Submission status: Wrong Answer

Solution code:
s=''
for c in input():s=[s[:-1],s+c][c=='B']
print(s)

Submission status: Wrong Answer

Solution code:
s=input()
i=0
ans=s
while i<len(s):
    if s[i]=="B":
        if ans=="":
            pass
        else:
            ans=ans[:-1]
    i+=1
print(ans)

Submission status: Wrong Answer

Solution code:
s=input()
i=0
ans=s
while i<len(s):
    if s[i]=="B":
        if s[i]==ans[0]:
            ans=ans[1:]
        else:
            ans=ans[:i-1]+ans[i+1:]
    i+=1
print(ans)

Submission status: Wrong Answer

Solution code:
s=input()
i=0
while i<len(s):
    if s[i]=="B":
        s=s[:i-1]+s[i+1:]
    i+=1
print(s)

Submission status: Wrong Answer

Solution code:
S = input()
ans = []
for s in S:
  if(s == 'B'):
    if(ans != []):
      ans.remove(ans[-1])
  else:
    ans.append(s)
print(''.join(ans))

Submission status: Wrong Answer

Solution code:
s = list(map(str,input()))
l = []
for i in s:
    if i == '0':
       l.append(i)
    elif i == '1':
       l.append(i)
    elif  i == 'B' and len(l) != 0:
        l.pop(-1)
print(int(''.join(l)))

Submission status: Wrong Answer

Solution code:
s = list(map(str,input().split()))
l = []
for i in s:
    if i == '0':
       l.append(i)
    elif i == '1':
       l.append(i)
    elif  i == 'B' and len(l) != 0:
        l.pop(-1)
print(''.join(l))

Submission status: Wrong Answer

Solution code:
s = input()

res = ''

for i in range(len(s)):
    if res == '':
        if s[i] == 'B':
            pass
        else:
            res += s[i]
    else:
        if s[i] == 'B':
            res = res[:i-1]
        else:
            res += s[i]
    
print(res)

Submission status: Wrong Answer

Solution code:
s = input()

res = ''

for i in range(len(s)):
  res += s[i]
  if s[i] == 'B':
    res = res[:i-2]
    
print(res)

Submission status: Wrong Answer

Solution code:
n =input()
ans=""

for i in range(len(n)):
    if n[i] == " ":
        if ans:
            ans = ans[:-1]
    else:
        ans +=n[i]

print(ans)

Submission status: Wrong Answer

Solution code:
s=list(input())
ans=''
for a in s:
    if ans=='' and a=='B':
        continue
    elif a=='B':
        ans = ans.rstrip(ans[-1])
    elif a=='1':
        ans+='1'
    else:
        ans+='0'
print(ans)

Submission status: Wrong Answer

Solution code:
s=list(input())
print(s)
ans=''
for a in s:
    if ans=='' and a=='B':
        continue
    elif a=='B':
        ans = ans.rstrip(ans[-1])
    elif a=='1':
        ans+='1'
    else:
        ans+='0'
print(ans)

Submission status: Wrong Answer

Solution code:
S = input()
str = ''

for w in S:
  if w == 'B':
    if str == '':
      continue
    elif str[-1] == '0':
      str = str.rstrip('0')
    elif str[-1] == '1':
      str = str.rstrip('1')
  elif w == '0':
    str += '0'
  elif w == '1':
    str += '1'
print(str)

Submission status: Wrong Answer

Solution code:
S = input()
str = ''

for w in S:
  if w == 'B':
    if str == '':
      continue
    else:
      if str[-1] == '0':
        str = str.rstrip('0')
      elif str[-1] == '1':
        str = str.rstrip('1')
  elif w == '0':
    str += '0'
  elif w == '1':
    str += '1'
print(str)

Submission status: Wrong Answer

Solution code:
a = ""
for i in input():
  if(i == "B" and a != ""):
    a = a[:len(a)-1]
  else:
    a += i
print(a)

Submission status: Wrong Answer

Solution code:
a = str(input())

b = list(a)

c = len(b)

strs = []

for i in range(c):
  if b[i] == 'B':
    if i == 0 or len(strs) == 0 or b[i-1] == 'B':
      continue
    else:
      strs = strs[:1]
  else:
    strs.append(b[i])

print(''.join(strs))

Submission status: Wrong Answer

Solution code:
S = input()
ans = ""
for s in S:
  if s == "B" and len(ans) > 0:
    ans = ans[:-1]
  else:
    ans += s
print(ans)

Submission status: Wrong Answer

Solution code:
s=list(input())
print(s)
l=[]
for i in s:
    if i=="1":
        l.append(i)
    elif i=="0":
        l.append(i)
    elif i=="B":
        if len(l)!=0:
            l.pop()
print("".join(l))

Submission status: Wrong Answer

Solution code:
s=list(map(str,input().split()))
l=[]
for i in s:
    if i=="1":
        l.append(i)
    elif i=="0":
        l.append(i)
    elif i=="B":
        l.pop()
print("".join(l))

Submission status: Wrong Answer

Solution code:
s=list(map(str,input().split()))
l=[]
for i in s:
    if i=="1":
        l=s.pop(0)
    elif i=="0":
        l=s.pop(0)
    elif i=="B":
        l.pop()
print("".join(l))

Submission status: Wrong Answer

Solution code:
s=list(map(str,input().split()))
l=[]
for i in s:
    if i=="1":
        l=s.pop(0)
    elif i=="0":
        l=s.pop(0)
    elif i=="B":
        l.pop()
print(l)

Submission status: Wrong Answer

Solution code:
import re
s = input()
for i in range(len(s)):
    result = re.sub(r'.?B', '', s)
print(result)

Submission status: Wrong Answer

Solution code:
import re
s = input()
result = re.sub(r'.?B', '', s)
print(result)

Submission status: Wrong Answer

Solution code:
s = input()
string=""
for i in s:
  if i == "0":
    string += "0"
  elif i == "1":
    string += "1"
  else:
    if len(string) > 0:
      string = string.rstrip(string[-1])
print(string)

Submission status: Wrong Answer

Solution code:
s=input()

s=list(s)

b=[]

for i in range(len(s)):
    if(s[i]=="0"):
        b.append(0)
    elif(s[i]=="1"):
        b.append(1)
    elif(s[i]=="B"):
        if(len(b)!=0):
            b.pop(-1)

b.reverse()

c=str(b)
c=c.replace(",","")
c=c.replace("[","")
c=c.replace("]","")
c=c.replace(" ","")

print(c)

Submission status: Wrong Answer

Solution code:
s = input()

result = ""
for i in s:
  if i == 'B':
    s = s[:-1]
  else:
    s = s+i
print(s)

Submission status: Wrong Answer

Solution code:
S=input()
L=""
n=0
while n<=len(S)-1:
  if S[n]=="1":
    L+="1"
  elif S[n]=="0":
    L+="0"
  elif S[n]=="B" and L!="":
    L=L.rstrip(S[n-1])
  n+=1
print(L)

Submission status: Wrong Answer

Solution code:
s=list(input())
out=[]
for i in range(len(s)):
    if s[i]=="B" and out==[]:
        out=[]
    elif s[i]=="B":
        del(out[-1])
    else:
        out.append(s[i])
for i in range(len(out)):
    print(out[i])

Submission status: Wrong Answer

Solution code:
a=list(input())
print(a)
b=[]
for i in a:
    if (i=="0") or (i=="1"):
        b.append(i)
    elif b!=[] :
        b.pop(-1)
print("".join(b))

Submission status: Wrong Answer

Solution code:
li = list(input())
string = ''
for item in li:
        if item == '0':
                string += '0'
        elif item == '1':
                string += '1'
        else:
                string = string[:0]

print(string)

Submission status: Wrong Answer

Solution code:
s = input()
#print(s)
length = len(s)
list_s = list(s)
ans = ''
for i in range(length):
    if list_s[i] == 'B':
        list_s[i] = ''
        list_s[i-1] = ''
#    print(list_s)

for i in range(length):
    ans += list_s[i]

print(ans)

Submission status: Wrong Answer

Solution code:
s = input()
print(s)
length = len(s)
list_s = list(s)
ans = ''
for i in range(length):
    if list_s[i] == 'B':
        list_s[i] = ''
        list_s[i-1] = ''
#    print(list_s)

for i in range(length):
    ans += list_s[i]

print(ans)

Submission status: Wrong Answer

Solution code:
s = input()
length = len(s)
list_s = list(s)
ans = ''
for i in range(length):
    if list_s[i] == 'B':
        list_s[i] = ''
        list_s[i-1] = ''

for i in range(length):
    ans += list_s[i]

print(ans)

Submission status: Wrong Answer

Solution code:
S = input()

S_list = list(S)

answer = []
for S_num in S_list:
    if S_num == '0':
        answer.append('0')
    elif S_num == '1':
        answer.append('1')
    elif not answer:
        continue
    else:
        del answer[-1]

answer_honmono = ''
answer_honmono = ''.join(answer)

Submission status: Wrong Answer

Solution code:
S = input()

S_list = list(S)

answer = []
for S_num in S_list:
    if S_num == '0':
        answer.append('0')
    elif S_num == '1':
        answer.append('1')
    elif not answer:
        continue
    else:
        del answer[-1]

print(answer)

Submission status: Wrong Answer

Solution code:
#! /usr/bin/python3
# バイナリハックイージー / Unhappy Hacking (ABC Edit)
"""
    1. 先頭のB全部を消す
    2.
"""
import re

test_mode = True
flag = False

s = str(input())

for _ in range(10):
    while s[0] == 'B':
        s = s[1:]
        if test_mode is True:
            print(s)
    s = re.sub('0B|1B', '', s)
    if 'B' not in s:
        print(s)
        break


"""
参考
    Pythonで文字列の最初・最後の１文字（数文字）を削除する
    https://robotics4society.com/2017/06/29/python_mojisakujo/
"""

Submission status: Wrong Answer

Solution code:
#! /usr/bin/python3
# バイナリハックイージー / Unhappy Hacking (ABC Edit)

import re

print(re.sub('0B|1B', '', str(input())))

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
from sys import stdin
s = stdin.readline().rstrip() + "0"
ans = ""
for i in range(len(s)-1):
    if s[i] != "B" and s[i+1] != "B":
        ans += s[i]
print(ans)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
from sys import stdin

s = stdin.readline().rstrip() + "0"
ans = ""

for i in range(len(s)-1):
    if s[i] != "B" and s[i+1] != "B":
        ans += s[i]

print(ans)

Submission status: Wrong Answer

Solution code:
s = input()
if "0B" in s or "1B" in s:
  s = s.replace("0B","")
  s = s.replace("1B","")
s = s.replace("B","")
print(s)

Submission status: Wrong Answer

Solution code:
s = input()
while "0B" in s or "1B" in s:
  s.replace("0B","")
  s.replace("1B","")
s.replace("B","")
print(s)

Submission status: Wrong Answer

Solution code:
print("1B" in "01B")

Submission status: Wrong Answer

Solution code:
s = input()
a = []

for _ in s:
    if _ == 'B':
        a = a[:-1]
    else:
        a += _

print(a)

Submission status: Wrong Answer

Solution code:
S = list(input())
for i in range(len(S)) :
    if S[i] == "B" :
        if i != 0 :
            S[i-1] = ""
        S[i] = ""
print("".join(S))

Submission status: Wrong Answer

Solution code:
s = list(input())

result = []

for i in range(len(s)):
    if i == 1:
        if s[i] != 'B':
            result.append(s[i])
    else:
        if s[i] != 'B':
            result.append(s[i])
        elif s[i] == 'B':
            if len(result) != 0:
                result.pop()

print(''.join(result))

Submission status: Wrong Answer

Solution code:
s = list(input())

result = []

for i in range(len(s)):
    if i == 1:
        if s[i] != 'B':
            result.append(s[i])
    else:
        if s[i] != 'B':
            result.append(s[i])
        else:
            if len(result) != 0:
                result.pop()

print(''.join(result))

Submission status: Wrong Answer

Solution code:
s = input()
ans = ''
for i in s:
    if i == 'B':
        ans = ans[:-1]
    else:
        ans += i
        print(ans)
print(ans)

Submission status: Wrong Answer

Solution code:
s=input()
a=''
for i in s:
    if i=='B':
        if len(a)!=0:a=a[:-1]
    else:a+=i
    print(a,i)
print(a)

Submission status: Wrong Answer

Solution code:
import re
print(re.sub('B','',re.sub(r'[01]B','',input())))

Submission status: Wrong Answer

Solution code:
S = input()[::-1]
res = ""

ruiseki = 0
for s in S:
    if s == 'B':
        ruiseki += 1
    else:
        if ruiseki > 0:
            ruiseki -= 1
        else:
            res += s
print(res)

Submission status: Wrong Answer

Solution code:
s = input()
data =[]
for i in range(len(s)):
  data.append(s[i])
array = []
for i in range(1, len(data)):
  if data[i] == "0":
    array.append("0")
  elif data[i] == "1":
    array.append("1")
  elif (len(array) != 0 and data[i]== "B"):
    array.pop(-1)
  else:
    pass

mojiretu = ''

for x in array:
    mojiretu += x

print(mojiretu)

Submission status: Wrong Answer

Solution code:
s_list = list(input())
ans_list = []

for s in s_list:
    if s == "1" or s == "0":
        ans_list.append(s)
    elif ans_list != []:
        ans_list.pop()
        
"".join(ans_list)

Submission status: Wrong Answer

Solution code:
inst = input()
buf = []
for s in inst:
  if len(buf) != 0 and s == "B":
    del buf[-1]
  else:
    buf.append(s)
print("".join(buf))

Submission status: Wrong Answer

Solution code:
inst = input()
buf = []
for s in inst:
  if s == "B" and len(buf) != 0:
    del buf[-1]
  else:
    buf.append(s)
print("".join(buf))

Submission status: Wrong Answer

Solution code:
inst = input()
buf = []
for s in inst:
  if s == "B" and len(buf) != 0:
    del buf[-1]
  else:
    buf.append(s)
print(buf)

Submission status: Wrong Answer

Solution code:
inst = input()
buf = []
for s in inst:
  if s == "B" and len(buf) != 0:
    buf.pop()
  else:
    buf.append(s)
print(buf)

Submission status: Wrong Answer

Solution code:
s = list(input())
S = ""
for i in range(len(s)):
    if s[i] == "B":
        if S == "":
            continue
        else:
            S = S.rstrip(S[-1])
    else:
        S += s[i]
print(S)

Submission status: Wrong Answer

Solution code:
string=input()
ans=""
for x in string:
    if x!="b":
        ans+=x
    else:
        ans=ans[:-1]
print(ans)