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: Runtime Error

Solution code:
s = input()
l = len(s)
t=[]
for i in range(l):
    c = s[i]
    if c=='B':
        if len(t)==0:
            continue
        else:
            t.remove(t[i-1])
    else:
        t.append(c)
print(t)

Submission status: Runtime Error

Solution code:
from collections import deque
s=deque(list(input()))
p=deque()
for i in range(len(s)):
    w=s.popleft()
    if w=="0":
        p.append("0")
    elif w=="1":
        p.append("1")
    else:
        p.pop()
for i in range(len(p)):
    print(p[i],end="")

Submission status: Runtime Error

Solution code:
s = input()
ans = []
dp = [""]*(len(s))
if s[0] != "B":
    dp[0] = s[0]
else:
    dp[0] = [""]

for i in range(len(s)-1):
    if s[i+1] != "B":
        dp[i+1] = dp[i] + s[i+1]
    else:
        dp[i+1] = dp[i][:len(dp[i])-1]
print(dp[len(s)-1])

Submission status: Runtime Error

Solution code:
s = input()
ans = []
dp = [""]*(len(s))
if s[0] != "B":
    dp[0] = s[0]
else:
    dp[0] = [""]

#print(dp)
for i in range(len(s)-1):
    if s[i+1] != "B":
        dp[i+1] = dp[i] + s[i+1]
    else:
        dp[i+1] = dp[i][:len(dp[i])-1]
    #print(dp)
print(dp[len(s)-1])

Submission status: Runtime Error

Solution code:
s = input()
ans = []
dp = [""]*(len(s))
if s[0] != "B":
    dp[0] = s[0]
else:
    dp[0] = [""]

#print(dp)
for i in range(len(s)-1):
    if s[i+1] != "B":
        dp[i+1] = dp[i] + s[i+1]
    else:
        dp[i+1] = dp[i][:-1]
    #print(dp)
print(dp[len(s)-1])

Submission status: Runtime Error

Solution code:
s = input()
ans = []
dp = [""]*(len(s))
if s[0] != "B":
    dp[0] = s[0]
else:
    dp[0] = [""]

#print(dp)
for i in range(len(s)-1):
    if s[i+1] != "B":
        if dp[i] != "":
            dp[i+1] = dp[i] + s[i+1]
        else:
            dp[i+1] = s[i+1]
    else:
        if dp[i] != "":
            dp[i+1] = dp[i][:-1]
        else:
            dp[i+1] = ""
    #print(dp)
print(dp[len(s)-1])

Submission status: Runtime Error

Solution code:
s = input()
ans = []
dp = [-1]*(len(s))
if s[0] != "B":
    dp[0] = s[0]
else:
    dp[0] = [-1]

#print(dp)
for i in range(len(s)-1):
    if s[i+1] != "B":
        if dp[i] != -1:
            dp[i+1] = dp[i] + s[i+1]
        else:
            dp[i+1] = s[i+1]
    else:
        if dp[i] != -1 and i-1 >= 0:
            dp[i+1] = dp[i-1]
        else:
            dp[i+1] = -1
print(dp[len(s)-1])

Submission status: Runtime Error

Solution code:
s=list(input())
t=["3","3","3","3","3","3","3","3","3","3"]
m=0
for i in range(0, len(s)):
    if s[i]=="B":
        if m > 0:
            t[m-1]="3"
            m=m-1
    if s[i]=="0":
        t[m]="0"
        m=m+1
    if s[i]=="1":
        t[m]="1"
        m=m+1
p=list()
q=0
while t[q]!="3":
    p.append(t[q])
    q=q+1
print("".join(p))

Submission status: Runtime Error

Solution code:
s=list(input())
t=["3","3","3","3","3","3","3","3","3","3"]
m=0
for i in range(0, len(s)):
    if s[i]=="B":
        if m > 0:
            t[m-1]="3"
            m=m-1
    if s[i]=="0":
        t[m]="0"
        m=m+1
    if s[i]=="1":
        t[m]="1"
        m=m+1
p=list()
q=0
while t[q]!="3":
    p.append(t[q])
    q=q+1
"".join(p)

Submission status: Runtime Error

Solution code:
s=list(input())
t=["3","3","3","3","3","3","3","3","3","3"]
m=0
for i in range(0, len(s)):
    if s[i]=="B":
        if m > 0:
            t[m-1]="3"
            m=m-1
    if s[i]=="0":
        t[m]="0"
        m=m+1
    if s[i]=="1":
        t[m]="1"
        m=m+1
p=list()
q=0
while t[q]!="3":
    p.append(t[q])
    q=q+1
int("".join(p))

Submission status: Runtime Error

Solution code:
a=input()
b=a.index
while "B" in a:
  if a.startswith("B"):
    a=a[1::]
  elif "B" in a:
    a=a[0:b("B")-1]+a[b("B")+1:]
print(a)

Submission status: Runtime Error

Solution code:
a=input()
ans=""
while len(a)>0:
  if a[0]=="0":
    ans+="0"
  elif a[0]=="1":
    ans+="1"
  elif len(ans)>0:
    ans=ans[,-1]
print(ans)

Submission status: Runtime Error

Solution code:
s=str(input())
ans=[]
for i in range(len(s)):
  if s[i]=='0':
    ans.append('0')
  elif s[i]=='1':
    ans.append('1')
  else:
    if i==0:
      pass
    else:
      del ans[i-1]
print(''.join(ans))

Submission status: Runtime Error

Solution code:
s = list(input())
answer = []

for i range s:
        if  i == "B":
            try:
                answer.pop()
            except IndexError:
                pass
        else:
            answer.append(i)

print(" ".join(answer))

Submission status: Runtime Error

Solution code:
s = list(input())
answer = []

for i range s:
        if  i == "B":
            try:
                answer.pop()
            except:
                pass
        else:
            answer.append(i)

print(" ".join(answer))

Submission status: Runtime Error

Solution code:
s = list(input())
answer = []

for i range s:
        if  i == "B":
            try:
                answer.pop()
            except:
                pass
        else:
            answer.append(i)

print("".join(answer))

Submission status: Runtime Error

Solution code:
s = list(input())
answer = []

for i range s:
        if  i == "B":
            try:
                answer.pop()
            except:
                pass
        else:
            answer.append(i)

print(answer)

Submission status: Runtime Error

Solution code:
x=int(input())
if x>=2000:
    print(1)
else:
    if (x//100)*100<=x<=(x//100)*105:
        print(1)
    else:
        print(0)

Submission status: Runtime Error

Solution code:
s = input()
from collections import deque
dq = deque()
for i in range(len(s)):
    if s[i] == "B":
        dq.pop()
        continue
    dq.append(s[i])
print("".join(dq))

Submission status: Runtime Error

Solution code:
s = input()

n = s.index('B')

s.pop(n-1)
print(s)

Submission status: Runtime Error

Solution code:
s = input()
ans = []
for _ in s:
    if _ == 'B':
        ans.pop()
    else:
        ans.append(_)
print(*ans, sep='')

Submission status: Runtime Error

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

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

result = ''.join(a)

print(result)

Submission status: Runtime Error

Solution code:
n = str(input())

ans = ''

for i in range(len(n)):
  if n[i] == 'B':
    ans = ans[-1]
  elif n[i] == '0':
    ans += '0'
  elif n[i] == '1':
    ans += '1'

print(ans)

Submission status: Runtime Error

Solution code:
s = list(input())
ans = []

for i in s:
    if i == 'B':
        ans.pop()
    else:
        ans.append(i)

print("".join(ans))

Submission status: Runtime Error

Solution code:
s = list(input())

hoge = []
for si in s:
  if si != "B":
    hoge.append(si)
  else:
    hoge.pop()
    
print("".join(hoge))

Submission status: Runtime Error

Solution code:
S=list(input())

D=[]


for i in range (1,len(S)):
    if S[i]=="B":
        del S[i-1]
        S.append("A")

for i in range (1,len(S)-1):
    if S[i]=="B":
        del S[i]
        S.append("A")

for i in range (0,abs(len(S)-2)):
    while S[i]=="B":
        S.remove("B")

for i in range (0,len(S)):        
    if S[i]=="0" or S[i]=="1":
        D.append(S[i]) 

D=''.join(D)
print(D)

Submission status: Runtime Error

Solution code:
for i in range (1,len(S)-1):
    if S[i]=="B":
        del S[i]
        S.append("A")

for i in range (0,abs(len(S)-2)):
    while S[i]=="B":
        S.remove("B")

for i in range (0,len(S)):        
    if S[i]=="0" or S[i]=="1":
        D.append(S[i]) 

D=''.join(D)
print(D)

Submission status: Runtime Error

Solution code:
S=list(input())

D=[]


for i in range (1,len(S)-1):
    if S[i]=="B":
        del S[i-1]
        S.append("A")

for i in range (1,len(S)-1):
    if S[i]=="B":
        del S[i]
        S.append("A")

for i in range (0,abs(len(S)-2)):
    while S[i]=="B":
        S.remove("B")
        
for i in range (0,len(S)):        
    if S[i]=="0" or S[i]=="1":
        D.append(S[i]) 
        
D=''.join(D)
print(D)

Submission status: Runtime Error

Solution code:
from collections import deque
s=deque(input())
A=deque()
for i in range(len(s)):
  a=s.popleft()
  if a=="B":
    A.pop()
  else:
    A.append(a)
print("".join(A))

Submission status: Runtime Error

Solution code:
s = input()
ans = []
x = 0

for c in s:
    if c == '0' or c == '1':
        ans.append(c)
    else:
        if len(ans) != 0:
            del ans[x-1]
    x += 1

print(''.join(ans))

Submission status: Runtime Error

Solution code:
s=input()
length = len(s)
ary = []

for i in length:
  if s[i] != "B":
    ary.append(s[i])
  elif len(ary) != 0:
    ary.pop(-1)
    
print("".join(ary))

Submission status: Runtime Error

Solution code:
ans = []
for i in input():
    if (i == '1' or i == '0'): ans.append(i) 
    if i == 'B': ans.pop() 
print(''.join(ans))

Submission status: Runtime Error

Solution code:
li = input()
li2 =[]
for n in li:
    if n == "0":
        li2.append("0")
    elif n == "1":
        li2.append("1")
    elif n == "B":
        if not len.li2 == 0:
            li2.pop()
print("".join(li2))

Submission status: Runtime Error

Solution code:
li = input()
li2 =[]
for n in li:
    if n == "0":
        li2.append("0")
    elif n == "1":
        li2.append("1")
    elif n == "B":
        li2.pop()
print("".join(li2))

Submission status: Runtime Error

Solution code:
s = list(map(str,input()))

ans = []

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

print(''.join(ans))

Submission status: Runtime Error

Solution code:
key = input()
s = []
for i in key:
  if i == '0' or if i == '1':
    s.append(i)
  else:
    if len(s) > 0:
      s.pop(-1)
print(s)

Submission status: Runtime Error

Solution code:
key = input()
s = []
for i in key:
  if i == '0' or i == '1':
    s.append(i)
  else:
    len(s) > 0:
      s.pop(-1)
print(s)

Submission status: Runtime Error

Solution code:
key = input()
s = []
for i in key:
  if i == '0' or if i == '1':
    s.append(i)
  else:
    len(s) > 0:
      s.pop(-1)
print(s)

Submission status: Runtime Error

Solution code:
s = list(input())
a = s.count('B')
b = []
for i in range(len(s)):
    if s[i] == 'B':
        b.append(i)
b.sort(reverse=True)
for i in b:
    s.pop(i)
    s.pop(i-1)
print(''.join(s))

Submission status: Runtime Error

Solution code:
s = input()

counter = 0
moji = ""
for i in s:
  if i == "B":
	moji[:-1]
    continue
  else:
    moji+ i

Submission status: Runtime Error

Solution code:
from collections import deque
s = input()
a = deque()
for i in s:
    if i == "B":
        a.pop()
    else:
        a.append(i)
print(''.join(a))

Submission status: Runtime Error

Solution code:
s = [i for i in input()]

for i in s:
    if i == 'B':
        s.remove(i)
        s.remove(tmp)  
    tmp = i

if s[0] == 'B':
    s.remove('B')
print(''.join(s))

Submission status: Runtime Error

Solution code:
s = [i for i in input()]

for i in s:
    if i == 'B':
        s.remove(i)
        s.remove(tmp)  
    tmp = i

if s[0] == 'B':
    s.remove('B')
print("".join(s))

Submission status: Runtime Error

Solution code:
s = [i for i in input()]

for i in s:
    if i == 'B':
        s.remove(i)
        s.remove(tmp)  
    tmp = i

if s[0] == 'B':
    s.remove('B')
print("".join(s))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s = input()

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

Submission status: Runtime Error

Solution code:
s = input()
l =[]
for i in range(len(s)):
    if s[i] == "0":
        l.append("0")
    elif s[i] == "1":
        l.append("1")
    elif s[i] =="B":
        if len(l) == 0:
           pass
        else:
           del l[i - 1]
print("".join(l))

Submission status: Runtime Error

Solution code:
S = list(input())
stack = []
stack.append(S.pop(0))

for s in S:
    if s == "B":
        if len(stack) > 0:
            stack.pop()
    else:
        stack.append(s)

print("".join(stack)

Submission status: Runtime Error

Solution code:
li = list(str(input()))
for i in range(li):
  if(li[i] == "B" and not i == 0):
    li[i-1] = ""
    li[i] = ""
print("".join(li))

Submission status: Runtime Error

Solution code:
li = list(str(input()))
for i in len(li):
  if(li[i] == "B" and not i == 0):
    li[i-1] = ""
    li[i] = ""
print("".join(li))

Submission status: Runtime Error

Solution code:
li = list(map(str, input()))
for i in len(li):
  if(not i == 0 and li[i] == "B"): 
    li[i-1] = ""
    li[i] = ""
print("".join(li))

Submission status: Runtime Error

Solution code:
li = list(input())
for i in len(li):
  if(not i == 0 and li[i] == "B"): 
    li[i-1] = ""
    li[i] = ""
print("".join(li))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S=input()
words=[*S]
answers=[]
for n in words:
    if n=='1':
        answers.append('1')
    elif n=='0':
        answers.append('0')
    else:
        if not answers:
            continue
        else:
            answers.pop()
mojiretu=''
for x in answers:
    mojiretu+=x
print(int(mojiretu))

Submission status: Runtime Error

Solution code:
S=input()
words=[*S]
answers=[]
for n in words:
    if n=='1':
        answers.append('1')
    elif n=='0':
        answers.append('0')
    else:
        if not answers:
            continue
        else:
            answers.pop()
mojiretu=''
for x in answers:
    mojiretu+=x
print(mojiretu)

Submission status: Runtime Error

Solution code:
s = list(input())

ans = []
for i in s:
    if(i == "B"):
        ans.pop(-1)
    else:
        ans+=i

for i in ans:
    print(i, end="")

print("")

Submission status: Runtime Error

Solution code:
s = str(input()).split('')

text = ''

for i in s:
  if i == 'B' and len(text) > 0:
    text = text[:-1]
  else:
    text += i
    
print(text)

Submission status: Runtime Error

Solution code:
C = []
A = input()
for i in A:
    if i == '0':
        C.append(i)
    if i == '1':
        C.append(i)
    if i == 'B' and  len(C)!=0:
        C.pop()

print("".join(C)

Submission status: Runtime Error

Solution code:
C = []
A = input()
for i in A:
    if i == '0':
        C.append(i)
    if i == '1':
        C.append(i)
    if i == 'B':
        C.pop()

print(C)

Submission status: Runtime Error

Solution code:
s = input()
l = []
for t in s:
  if t == '0' or t == '1':
    l.append(t)
  elif t == 'B':
    l.pop()
for r in l:
  print(r, end='')

Submission status: Runtime Error

Solution code:
s = input()
c = ''
for t in s:
  if t == '0' or t == '1':
    c += t
  if t == 'B' and c != '':
    c -= c[-1]
print(c)

Submission status: Runtime Error

Solution code:
s = input()
c = ''
for t in s:
  if t == '0' or t == '1':
    c += t
  elif t == 'B':
    if c != '':
      k = c[-1]
      c -= k
print(c)

Submission status: Runtime Error

Solution code:
s = input()
c = ''
for t in s:
  if t == '0' or t == '1':
    c += t
  elif t == 'B':
    if c != '':
      c = c - c[-1]
print(c)

Submission status: Runtime Error

Solution code:
n=input()
ans=[]
y=""
for i in range(len(n)):
    if n[i]=="0":
        ans.append("0")
    
    elif n[i]=="1":
        ans.append("1")
    
    elif n[i]=="B":
        del(ans[i-1])

for x in ans:
    y=y+x
print(y)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s = str(input())
ans = ""
n = len(s)
for i in range(n)
  if s[i] = "B":
    if ans == "":
      ans = ans + ""
    else:
      ans = ans[:-1]
  else:
    ans = ans + s[i]

Submission status: Runtime Error

Solution code:
s = input()
t = ''

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s= input()
 
list=[]
for i in s:
  if i == '0':
    list.append('0')
  elif i == '1':
    list.append('1')
  elif i == 'B':
    list.pop(-1)
print(list)

Submission status: Runtime Error

Solution code:
s= input()

list=[]
for i in s:
  if i == '0':
    list.append('0')
  elif i == '1':
    list.append('1')
  elif i == 'B':
    list.remove(-1)
print(list)

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


def main():
    S = list(input().split())
    reslut = ''
    for s in S:
        if S == 'B':
            reslut.pop()
        else:
            reslut.append(s)
    print(reslut)


if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
import math
N=int(input())
p=math.sqrt(N*2-0.25)-0.5
q=int(p)+1
M=q*(q+1)//2
L=M-N#must0or+
for i in range(1,q+1):
    if i != L:
        print(i)

Submission status: Runtime Error

Solution code:
stack = []
for s in input():
    if s == '0' or s == '1':
        stack.append(s)
    if s == 'B':
        stack.pop()
print(''.join(stack))

Submission status: Runtime Error

Solution code:
stack = []
for s in input()
    if s == '0' or s == '1':
        stack.append(s)
    if s == 'B':
        stack.pop()
print(''.join(stack))

Submission status: Runtime Error

Solution code:
s = list(input())
for i in range(len(s)):
    if s[i]=="B":
        del s[i-1:i+1]
print(*s,sep="")

Submission status: Runtime Error

Solution code:
s = input()
ans = []
for c in s:
    if c == "0":
        ans.append("0")
    if c == "1":
        ans.append("1")
    if c == "B":
        ans.pop(-1)
print("".join(ans))

Submission status: Runtime Error

Solution code:
a=input()

m=[]
for i in a:
    if i=='0':
        m.append(i)
    if i=='1':
        m.append(i)
    if i=='B':
        m.pop()
m="".join(m)
print(m)

Submission status: Runtime Error

Solution code:
s=input()
l=[]
for i in s:
    if i=='0':
        l.append('0')
    elif i=='1':
        l.append('1')
    elif i=='B':
        l.pop()
    
for i in l:
    print(i,end='')

Submission status: Runtime Error

Solution code:
s = input()
len = 0
op = []
 
for i in s:
    if(i == '1'):
        op.append('1')
        len += 1
    elif(i == '0'):
        op.append('0')
        len += 1
    elif(i == 'B'):
        if(len > 0):
            op.pop()
            len = len - 1
 
for i in op:
    print(i, end = ''

Submission status: Runtime Error

Solution code:
inputs = list(map(str, input()))

output = ''
for i in inputs:
	if output == 'B':
    	output = output[:-1]
	elif output == '1':
		output += '1'
    else:
      	output += '0'
print(output)

Submission status: Runtime Error

Solution code:
S=list(input())
stack=[]
for s in S:
    if s!="B":
        stack.append(s)
    else:
        stack.pop()
print("".join(stack))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

for i in range(len(s)):
  if s[i] != "B":
    ans.append(s[i])
  else:
    if len(s) == 0:
      continue
    elif len(s) > 0:
      ans.pop(-1)
      
print("".join(ans))

Submission status: Runtime Error

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

for i in range(len(s)):
  if s[i] != "B":
    ans.append(s[i])
  else:
    if len(s) > 0:
      ans.pop(-1)
      
print("".join(ans))

Submission status: Runtime Error

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

for i in range(len(s)):
    if (s[i] == "B"):
        if(len(a) == 0):
            continue
        else:
            a.remove(a[i-1])
    else:
        a.append(s[i])
print(''.join(a))

Submission status: Runtime Error

Solution code:
chars = input()

ans = []
for c in chars:
    if c in ['0','1']:
        ans.append(c)
    elif len(ans) != 0:
        ans.pop(-1)
        
        
p;rint(''.join(ans))

Submission status: Runtime Error

Solution code:
s = input()
s = s.replace("B0", "")
s = s.replace("B1", "")
s = s.replace("B", "")
print(r)

Submission status: Runtime Error

Solution code:
s=input()
kouho = []
ans = [s[i] for i in range(len(s))]
for i in range(len(s)):
    if s[i] == "B" and i>=1:
        kouho.append(i-1)
kouho.sort()
kouho.reverse()
for j in kouho:
    ans.pop(j)
    ans.pop(j)
kesu = []
for k in range(len(ans)):
    if ans[k]=="B":
        kesu.append(k)
kesu.sort()
kesu.reverse()
for m in kesu:
    ans.pop(m)
print(*ans,sep="")

Submission status: Runtime Error

Solution code:
s = input()

ans = []

for i in s:
    if i == "0":
        ans.append("0")
    elif i == "1":
        ans.append("1")
    else:
        ans.pop()
print("".join(ans))

Submission status: Runtime Error

Solution code:
import sys
input = sys.stdin.readline
ans = []
s = list(input().rstrip())
for i in s:
    if s == "0":
        ans.apppend("0")
    elif s == "1":
        ans.append("1")
    else:
        ans.pop()
print("".join(ans))

Submission status: Runtime Error

Solution code:
t = ""
s = input()
for i in s:
  if i == 'B' and len(t) > 0:
    t.pop()
  else:
    t.append(i)
print(t)

Submission status: Runtime Error

Solution code:
s = str(input())
lst = []

for i in range(len(s)):
    if s[i]=='B' and len(lst)!=0:
        del lst[-1]
    else:
        for j in range(2):
            if int(s[i])==j:
                lst.append('{}'.format(j))

print(''.join(lst))

Submission status: Runtime Error

Solution code:
def typing(s, ans):
    for i in range(len(s)):
        if len(ans) != 0:
            continue
        elif s[i] == '0':
            ans.append('0')
        elif s[i] == '1':
            ans.append('1')
        elif s[i] == 'B':
            ans.pop()

    print(''.join(ans))

S = str(input())
ANS = []
typing(S, ANS)

Submission status: Runtime Error

Solution code:
def typing(s, ans):
    for i in range(len(s)):
        if s[i] == '0':
            ans.append('0')
        elif s[i] == '1':
            ans.append('1')
        elif s[i] == 'B' and ans != '':
            ans.pop()
        else:
            continue
            
    print(ans)

S = str(input())
ANS = []
typing(S, ANS)

Submission status: Runtime Error

Solution code:
s = input()
m = []
for i in s:
    if i == "0":
        m.append(i)
    elif i == "1":
        m.append(i)
    else:
        m.pop(-1)
answer = "".join(m)
print(answer)

Submission status: Runtime Error

Solution code:
s = input()
answer = []
for i in s:
    if i == "0":
        answer.append(0)
    elif i == "1":
        answer.append(1)
    else:
        answer.pop(-1)
print(*answer)

Submission status: Runtime Error

Solution code:
# coding: utf-8
import sys


def main(argv=sys.argv):

  inputs_ = list(input())

    string_ = []

    for input_ in inputs_:

        if input_ == 'B':

            if not string_ == []:
              
                string_.pop(-1)

        else:

            string_.append(input_)

    print(''.join(string_))

    return 0


if __name__ == '__main__':
    sys.exit(main())

Submission status: Runtime Error

Solution code:
s = input()
ans = ''
a_s = s[::-1]
b = 0
for index, x in enumerate(a_s):
  if x == 'B':
    b += 1
  elif b == 0:
	ans.append(x)
  else:
    b -= 1
print(ans[::-1])

Submission status: Runtime Error

Solution code:
S = list(input())
final_str = []
for key in S: 
    if key == "B":
      final_str = final_str[:-1]
    else:
      final_str.append(key)
print(''.join(final_str)

Submission status: Runtime Error

Solution code:
S = list(input())
for key in S: 
    if key == "B":
      final_str = final_str[:-1]
    else:
      final_str.append(key)
print(''.join(final_str)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s = input()
ans = []
for i in s:
    if i != "B":
        ans.append(i)
        continue
    if len(i) == 0:
        continue
    elif len(i) != 0:
        ans.pop()
print(*ans, sep="")

Submission status: Runtime Error

Solution code:
s = input()
ans = []
for i in s:
    if i != "B":
        ans.append(i)
    else:
        ans.pop()
print(*ans, sep="")

Submission status: Runtime Error

Solution code:
set = input()
words = []
for i in range(len(set)):
    if set[i] == "0":
        words.append("0")
    if set[i] == "1":
        words.append("1")
    if set[i] == "B":
        words.pop(-1)
word = ""
for i in words:
    word += i
print(word)

Submission status: Runtime Error

Solution code:
s = list(input())

ans = ''
for x in s:
    if x == '1' or x == '0':
        ans += x
    elif ans:
        ans[-1].remove
print(ans)

Submission status: Runtime Error

Solution code:

if __name__ == '__main__':
    INPUT=input()
    ans=[]
    for i in INPUT:
        if i=="0":
            ans.append("0")
        elif i=="1":
            ans.append("1")
        else:
            ans.pop()
    print("".join(ans))

Submission status: Runtime Error

Solution code:
s = list(input())
try
    bs = s.index('B')
except:
    bs=-1

while bs != -1:
    if bs == 0:
        del s[bs]
    else:
        del s[bs-1]
        del s[bs-1]
    try:
        bs = s.index('B')
    except:
        bs = -1

print(''.join(s))

Submission status: Runtime Error

Solution code:
s = list(input())
bs = s.index('B')

while bs != -1:
    if bs == 0:
        del s[bs]
    else:
        del s[bs-1]
        del s[bs-1]
    try:
        bs = s.index('B')
    except:
        bs = -1

print(''.join(s))

Submission status: Runtime Error

Solution code:
keys = input()
outputs = []

for key in keys:
    if key == 'B':
        if outputs is None:
            pass
        else:
            outputs.pop()
    else:
        outputs.append(key)

for output in outputs:
    print(output, end='')

Submission status: Runtime Error

Solution code:
keys = input()
outputs = []

for key in keys:
    if key == 'B':
        if outputs == None:
            pass
        else:
            outputs.pop()
    else:
        outputs.append(key)

for output in outputs:
    print(output, end='')

Submission status: Runtime Error

Solution code:
keys = input()
outputs = []

for key in keys:
    if key == 'B':
        outputs.pop()
    else:
        outputs.append(key)

for output in outputs:
    print(output, end='')

Submission status: Runtime Error

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

for i, j in enumerate(s):
    if j in ["0", "1"]:
        ans.append(j)
    else:
        if len(ans):
            del ans[i - 1]

print("".join(ans))

Submission status: Runtime Error

Solution code:
from collections import deque
s = list(str(input()))
ans = deque()
for i in s:
  if i == "B":
    if ans == []:
      continue
    else:
      ans.pop()
  else:
    ans.append(i)
print("".join(ans))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s = list(map(str,input().split()))
n = len(s)
ans = []
for i in range(n):
  if i == "B":
    if ans == []:
      continue
    else:
      ans.remove(ans[-1])
  else:
    ans.appned(i)
print("".join(ans))

Submission status: Runtime Error

Solution code:
##### 解けた #####

S=input()
A=[""]

for s in S: # 入力の文字列1文字ずつ見てゆく
    if s in ["0","1"]: # もし0か1の場合、それを追加
        A.append(s)
    elif s=="B": # もしバックスペースの場合、1文字削除
        A.pop(-1)

print("".join(A))

Submission status: Runtime Error

Solution code:
s = list(input())
ans_list=[]
for i in range(len(s)):
    if(s[i] == "0"):
        ans_list.append("0")
    elif(s[i] == "1"):
        ans_list.append("1")
    elif(s[i] == "B"):
        if(ans_list != 0):
            ans_list.pop()
        else:
            continue
for i in range(len(ans_list)):
    print(ans_list[i],end='')

Submission status: Runtime Error

Solution code:
s=str(input())
x=''
list=[]
for i in range(len(s)):
    if s[i]=='1':
        list.append('1')
    elif s[i]=='0':
        list.append('0')
    elif s[i]=='B' and len(list)!=0:
        del list[i-1]

for i in range(len(list)):
    x += list[i]

print(x)

Submission status: Runtime Error

Solution code:
s=str(input())
x=''
list=[]
for i in range(len(s)):
    if s[i]=='1':
        list.append('1')
    elif s[i]=='0':
        list.append('0')
    elif s[i]=='B' and len(list)!=0:
        del list[i-1]
    print(list)
for i in range(len(list)):
    x += list[i]

print(x)

Submission status: Runtime Error

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

for i in range(len(s)):
  if s[i] == '0':
    L.append('0')
  elif s[i] == '1':
    L.append('1')
  elif s[i] == 'B':
    del L[-1]

print(''.join(L))

Submission status: Runtime Error

Solution code:
s = str(input())
n = len(s)
a = []
for i in range(n):
    if s[i] != 'B':
        a.append(s[i])
    else:
        if len(s) != 0:
            a.pop(-1)
t =''
m = len(a)
for j in range(m):
    t += a[j]
print(t)