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:
# -*- coding: utf-8 -*-

s = list(input())
ans = []

for j in range(len(s)):
    if (s[j]) == "B":
        l = len(ans)
        if l == 0:
            continue
        else:
            del ans[j-1]
    else:
        ans.append(s[j])

print("".join(ans))

Submission status: Runtime Error

Solution code:
from itertools import groupby as gb
ans=""
for i,b in gb(input()):
  if i=="B":
    s=s[:-len(list(b))]
  else:s+=i*len(list(b))
print(ans)

Submission status: Runtime Error

Solution code:
s = input()
j = 0
for i in range(len(s)):
    #print("i=",i)
    if s[i-(2*j)] == "B":
        #print(i-(2*j))
        #print(s)
        if s[0] == "B":
            s = 'x'+s[1:]
            #print(s)
            #print(s[0])
        else:
            #print(i-(2*j))
            s = s.replace(s[i-1-(2*j)]+s[i-(2*j)],'')
            j += 1
            s += 'xx'
            #print(s)
ans = s.replace('x','')
print(ans)

Submission status: Runtime Error

Solution code:
s = input()
j = 0
for i in range(len(s)):
    if s[i-(2*j)] == "B":
        if s[0] == "B":
            s = s.replace(s[0],'')
            s += 'x'
        else:
            s = s.replace(s[i-1-(2*j)]+s[i-(2*j)],'')
            j += 1
            s += 'xx'
            #print(s, i-(2*j))
ans = s.replace('x','')
print(ans)

Submission status: Runtime Error

Solution code:
s = [str(i) for i in list(str(input()))]
x = list()
for i in s:
    if i == "0" or i == "1":
      x.append(i)
    else:
        x.pop(-1)
print(x)

Submission status: Runtime Error

Solution code:
S = input()
stack = []

for s in S:
  if s == 'B':
    stack.pop()
  else:
    stack.append(s)
    
    
print(*stack, sep = '')

Submission status: Runtime Error

Solution code:
s = list(input())

ans = ""

for i in range(len(s)):
    if s[i] == "0":
        ans += "0"
    elif s[i] == "1":
        ans += "1"
    elif s[i] == "B":
        if len(ans) > 0:
            ans = ans.replace(ans[i-1], "", 1)
        else:
            pass

print(ans)

Submission status: Runtime Error

Solution code:
n = input()

n_list = list(n)
result = []
result2 = ''
     
for i in range(len(n)):
    if n_list[i] == 'B':
        if i == 0:
            pass
        elif n_list[i-1] == '':
            pass
        else:
            result.pop()
    elif n_list[i] == '0':
        result.append('0')
    elif n_list[i] == '1':
        result.append('1')
    
    result2 = ''.join(result)
    print(result2)

Submission status: Runtime Error

Solution code:
n_list = list(n)
result = []
result2 = ''

for i in range(len(n)):
    if n_list[i] == 'B':
        if i == 0:
            pass
        elif n_list[i-1] == '':
            pass
        else:
            result.pop()
    elif n_list[i] == '0':
        result.append('0')
    elif n_list[i] == '1':
        result.append('1')
    
    result2 = ''.join(result)
    print(result2)

Submission status: Runtime Error

Solution code:
    n = input()
     
    n_list = list(n)
    result = []
    result2 = ''
     
    for i in range(len(n)):
        if n_list[i] == 'B':
            if i == 0:
                pass
            elif n_list[i-1] == 'B':
                pass
            else:
                result.pop()
        elif n_list[i] == '0':
            result.append('0')
        elif n_list[i] == '1':
            result.append('1')
        
        result2 = ''.join(result)
        print(result2)

n = input()

n_list = list(n)
result = []
result2 = ''

for i in range(len(n)):
    if n_list[i] == 'B':
        if i == 0:
            pass
        elif n_list[i-1] == '':
            pass
        else:
            result.pop()
    elif n_list[i] == '0':
        result.append('0')
    elif n_list[i] == '1':
        result.append('1')
    
    result2 = ''.join(result)
    print(result2)

提出情報

Submission status: Runtime Error

Solution code:
result = []
result2 = ''

for i in range(10):
    n = input()

    if n == 'B':
        if i == 0:
            pass
        elif result[i-1] == 'B':
            pass
        else:
            result.pop()
    elif n == '0':
        result.append('0')
    elif n == '1':
        result.append('1')
    
    result2 = ''.join(result)
    print(result2)

Submission status: Runtime Error

Solution code:
i = 0
result = []
result2 = ''

while True:
    n = input()

    if n == 'B':
        if i == 0:
            pass
        elif result[i-1] == 'B':
            pass
        else:
            result.pop()
    elif n == '0':
        result.append('0')
    elif n == '1':
        result.append('1')
    
    result2 = ''.join(result)
    print(result2)

    i += 1

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
res = ''
for x in input():
    if x = 'B':
        res = res[:-1]
    else:
        res += x 
print(res)

Submission status: Runtime Error

Solution code:
s = list(input())
len_s = len(s)
output = []
for i in range(0,len_s-1):
    if s[i+1] =="B":
        output[i] = "D"
    output.append(s[i])
output2 = [j for j in output if j.isdigit()]
print("".join(output2))

Submission status: Runtime Error

Solution code:
import collections

S=input()
N=len(S)
D=collections.deque([])

for i in range(N):
  if S[i]=="B":
    D.pop()
  else:
    D.append(S[i])
    
print("".join(list(D)))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s = input()
a = ""
for i in range(0, len(s)):
  if s[i] == "0":
    a += "0"
  elif s[i] == "1":
    a += "1"
  elif s[i] == "B" and len(a) != 0:
    del a[-1]
print(a)

Submission status: Runtime Error

Solution code:
import sys

while True:
    s = input()

    if s == '':
        continue
    elif len(str(s)) >= 10:
        continue
    else:
        s_input = [x for x in s]

    s_output = []

    for n in s_input:
        if n == '1' or n == '0':
            s_output.append(n)
        elif n == 'B':
            backspace = len(s_output)-1
            s_output = s_output[:backspace]

    if '0'  or '1' in s_output:
        print(''.join(s_output))
        break

sys.exit()

Submission status: Runtime Error

Solution code:
s = input()
ans=[]
for i in range(len(s)):
  if s[i]==0 or s[i]==1:
    ans.append(i)
  else:
    try;ans.pop()
    except:pass
print("".join(ans))

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a=list(input())
b=[]
for i in range(len(a)):
  if a[i]=="0":
    b.append("0")
  elif a[i]=="1":
    b.append("1")
  else:
    b.pop()
print(*b,sep="")

Submission status: Runtime Error

Solution code:
lines = list(input())
answers = []
out = ""
for line in lines:
    if line == "0" or line == "1":
        answers.append(line)
    else:
        answers.pop()
for answer in answers:
    out += answer
print(out)

Submission status: Runtime Error

Solution code:
S=input()

result=[]

for s in S:
  print(result)
  #if s=="B":
    if len(result)>0:
      #print("nBack")
      result.pop()
  else:
    result.append(s)

print(*result)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S = input()
L = []
for i in S:
  if i == 'B':
    L.pop()
  else:
    L.append(i)
print(*L)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
ans=""
for i in input():
  if x=="B":
    t=t[:-1]
print(ans)

Submission status: Runtime Error

Solution code:
s = input()
t = []
for x in s:
  if x =="B":
    try:t.pop()
    except:pass
  else:
    t.append(x)
print("".joint(t))

Submission status: Runtime Error

Solution code:
#Bとその前１文字を消せば良い
s =list(input())
lis = []
for i in range(len(s)):
    if s[i] == "B":
        if len(lis)>1:
            lis[i-1]=""
            lis.append("")
    else: lis.append(s[i])
print("".join(lis))

Submission status: Runtime Error

Solution code:
#Bとその前１文字を消せば良い
s =list(input())
lis = []
for i in range(len(s)):
    if s[i] == "B": 
        lis[i-1]=""
        lis.append("")
    else: lis.append(s[i])
print("".join(lis))

Submission status: Runtime Error

Solution code:
s = input()
str = ""
count = 0
for i in range(len(s)):
    #print("str",str)
    if s[i] == "0":
        str += s[i]
        count += 1
    elif s[i] == "1":
        str += s[i]
        count += 1
    elif s[i] == "B":
        if count > 0:
            str = str.rstrip(str[count-1])
            count -= 1


print(str)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;

int main(){
  string s;
  cin >> s;
  string S="";
  for(int i=0;i<s.size();i++){
    if(s.at(i)=='0'){
      S+='0';
    }else if(s.at(i)=='1'){
      S+='1';
    }else if(s.at(i)=='B'){
      if(S.size()!=0){
        S.pop_back();
      }
    }
  }
  cout << S << endl;
  return 0;
}

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;

int main(){
  string s;
  cin >> s;
  string S="";
  for(int i=0;i<s.size();i++){
    if(s.at(i)=='0'){
      S+='0';
    }else if(s.at(i)=='1'){
      S+='1';
    }else{
      if(S.size()!=0){
        S.pop_back();
      }
    }
  }
  cout << S << endl;
  return 0;
}

Submission status: Runtime Error

Solution code:
s=input()
s_list=list(s)

string=[]

for i, x in enumerate(s_list):
    if x=='0':
        string.append('0')
    if x=='1':
        string.append('1')
    if x=='B':
        string.pop()
        
string_out=''.join(string)

print(string_out)

Submission status: Runtime Error

Solution code:
s=input()
mylist=[y for y in s]
for x in range(len(s)):
    if mylist[0]=='b' or mylist[0]=='B':
        print(None)
    elif mylist[x]=='b' or mylist[x]=='B':
        mylist.pop(x)
        mylist.pop(x-1)
    else:
        pass
print(''.join(mylist))

Submission status: Runtime Error

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

for i in s:
  if i=="B":
    z.pop()
  else:
    z.append(i)

print("".join(z))

Submission status: Runtime Error

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] = ""
print("".join(a))

Submission status: Runtime Error

Solution code:
 = 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: Runtime Error

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

Submission status: Runtime Error

Solution code:
s = list(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:
#include <bits/stdc++.h>

using namespace std;

int main(){
	ios::sync_with_stdio(false);	
	cin.tie(0);
	string s;
	cin >> s;
	string ans = "";
	for (char c : s){
		if (c == '0'){
			ans += '0';
		}	
		if (c == '1'){
			ans += '1';
		}
		if (c == 'B' && !ans.empty()){
			ans.erase(ans.begin() + ans.size()-1);
		}
	}
	cout << ans;
	return 0;
}

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>

using namespace std;

int main(){
	ios::sync_with_stdio(false);	
	cin.tie(0);
	string s;
	cin >> s;
	string ans;
	for (char c : s){
		if (c == '0'){
			ans += '0';
		}	
		if (c == '1'){
			ans += '1';
		}
		if (c == 'B' && !ans.empty()){
			ans.erase(ans.begin() + ans.size()-1);
		}
	}
	cout << ans;
	return 0;
}

Submission status: Runtime Error

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

for s in a:
  if s=="0" or s=="1":
    b.append(s)
  else:
    b.pop()
else:
  print("".join(b))

Submission status: Runtime Error

Solution code:
s = input()
s_list = list(s)
out_list = []

for i in range(len(s_list)):
    if s_list[i] == "0":
        out_list.append("0")
    elif s_list[i] == "1":
        out_list.append("1")
    elif s_list[i] == "B":
        del out_list[-1]

for ol in out_list:
    print(ol, end="")

Submission status: Runtime Error

Solution code:
N = int(input())
S = 0
for i in range(1, N+1):
  S += i
print(S)

Submission status: Runtime Error

Solution code:
N = int(input())
S = 0
for i in range(1, N+1):
  S += 1
print(S)

Submission status: Runtime Error

Solution code:
s = input()

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

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

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

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

print(''.join(ans))

Submission status: Runtime Error

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

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

print(''.join(ans))

Submission status: Runtime Error

Solution code:
s=list(input())
ans=""
l=len(s)
n=0
for i in range(l):
  if s[i]=="0"or s[i]=="1":
    ans+=s[i]
    n+=1
  elif s[i]=="B" and n==0:
    pass
  else:
    ans-=ans[-1]
    n-=1
print(ans)

Submission status: Runtime Error

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
    else:
        del r[-1]



print("".join(r))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#include<bits/stdc++.h>
using namespace std;
int a[11],i;
char c;
int main(){
	while(cin>>c){
		switch(c){
			case '1':a[i++]=1;break;
			case '0':a[i++]=-1;break;
			case 'B':if(i)a[--i]=0;break;
		}
	}
	for(int j=0;j<i;j++)cout<<((a[j]+1)>>1);
}

Submission status: Runtime Error

Solution code:
s=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()
for j in range(len(ans)):
  print(ans[j],end='')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def main():
    s = list(input())
    ans = []
    for i in s:
        if i =='B':
            ans.pop(-1)
        else:
            ans.append(i)
    for i in ans:
        print(i,end='')

if __name__=='__main__':
    main()

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S=input()
ans=[]
for i in range(len(S)):
  if S[i] in ["0","1"]:
    ans.append(S[i])
  else:
    ans.pop(-1)
print("".join(ans))

Submission status: Runtime Error

Solution code:
s=input()

k=""

m=len(s)

for i in range(m):
  if i!="B":
    k+=i
  else:
    k[:-1]
print(k)

Submission status: Runtime Error

Solution code:
# -*- coding: UTF-8 -*-
s = input()
a = []
for c in s:
    if (c == '0'):
        a.append('0')
    elif (c == '1'):
        a.append('1')
    else:
        a.pop()

answer = ''.join(a)
print(answer)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S = input()

disp = []
for s in S:
    if s == "B":
        if len(S) > 0:
            disp.pop()
        continue
    disp.append(s)
print("".join(disp))

Submission status: Runtime Error

Solution code:
S = input()

disp = []
for s in S:
    if s == "B":
        if len(s) > 0:
            disp.pop()
        continue
    disp.append(s)
print("".join(disp))

Submission status: Runtime Error

Solution code:
s = input()
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":
        ans.rstrip()
print(ans)

Submission status: Runtime Error

Solution code:
s = input()
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':
        ans.pop(-1)
print(''.join(ans))

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
import numpy as np

def solve(S):
    A = []
    for i in range(len(S)):
        if(S[i]=="0" or S[i]=="1"):
            A.append(S[i])
        else:
            A.pop()
    print("".join(A))
    
if __name__ == '__main__':
    S = input()
    
    solve(S)

Submission status: Runtime Error

Solution code:
s=input()

output=[]

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

for i in range(len(output)):
    print(output[i],end="")

Submission status: Runtime Error

Solution code:
# 入力
s=input()

a=''
for x in s:
  if x=='0':
    a+='0'
  elif x=='1'
    a+='1'
  else:
    # 文字列が空でない場合、末尾を削除
    if a!='':
      a=a[:-1]

# 出力
print(a)

Submission status: Runtime Error

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

for i in range(n):
    if s[i]!='B':
        a.append(s[i])
    else:
        del a[-1]
print(''.join(a))

Submission status: Runtime Error

Solution code:
a=input()
ans=[]
count=0
for i in range(len(a)):
  if a[i] == "0" or a[i] == "1":
    ans.append(a[i])
    count += 1
  elif a[i] == "B" and count >= 1:
    ans.remove(a[count-1])
    count -= 1
  else:
    i += 1

print("".join(ans))

Submission status: Runtime Error

Solution code:
s = input()
# s = "01B0"
# print(s[0])

ans = []
for key in range(len(s)):

    if s[key] == "0" or s[key] == "1":
        ans.append(s[key])
    if s[key] == "B":
        ans.pop(-1)
print("".join(ans))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = list(input())
m = []

for i in n:
  if i == '0':
    m.append(0)
  elif i == '1':
    m.append(1)
  elif i == 'B':
    del m[-1]
    
ans = ''.join(map(str,m))
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

from collections import deque

S: str = input()

d = deque()

for c in S:
    if c == '0':
        d.append(c)
    elif c == '1':
        d.append(c)
    else:
        if len(d) > 0:
            d.pop()

ans: str = str()

for c in d:
    ans += c
print(ans)

Submission status: Runtime Error

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

for i in range(len(S)):
    if S[i] == 'B':
        if i == 0:
            pass
        else:
            del ans[-1]
        
    else:
        ans.append(S[i])

for x in ans:
    print(x,end='')
print()

Submission status: Runtime Error

Solution code:
s = input()
out = ''
for w in s:
  if w == '1' or w == '0':
    out += w
   elif len(out) > 0:
    out = out[:-1]
    
print(out)

Submission status: Runtime Error

Solution code:
s = input()
out = ``
for w in s:
  if w == '1' or w == '0':
    out += w
   elif len(out) > 0:
    out = out[:-1]
    
print(out)

Submission status: Runtime Error

Solution code:
s = input()
out = []
for i in range(10):
  if s[i] == 'B':
    del out[-1]
    else:
      out.append(s[i])
        
print(out)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a = input()
b = len(a)
for i in range(b):
  if a[i]=="B":
    a.remove(a[i-1])
a.remove["B"]
print(a)

Submission status: Runtime Error

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.pop(-1)
print(''.join(B))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s=input();k=[]
for i in range(0,len(s)):
    if s[i]!='B':
        k.append(int(s[i]))
    else:
        if k!=[]:
            del k[-1]
for j in range(0,len(s)):
    print(k[j],end='')
print('')

Submission status: Runtime Error

Solution code:
s=input();k=[]
for i in range(0,len(s)):
    if s[i]!='B':
        k.append(int(s[i]))
    else:
        del k[-1]
for j in range(0,len(s)):
    print(k[j],end='')
print('')

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s = list(input())
w =[]
for i in s:
    if i == "B":
        w.pop(-1)
    else:
        w.append(i)
print("".join(w))

Submission status: Runtime Error

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(int(''.join(l)))

Submission status: Runtime Error

Solution code:
c=list(input())
s=""
for x in c:
    if x!=B:
        s+=x
    else:
        s=s[:-1]
print(s)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

for w in S:
  if w == 'B':
    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: Runtime Error

Solution code:
A = []
for a in input():
    if a == '0' or a == '1':
        A.append(a)
    else:
        del A[-1]
print(''.join(A))

Submission status: Runtime Error

Solution code:
s = input()
editor = [""]
for e in s:
    if e == "0":
        editor.append("0")
    elif e == "1":
        editor.append("1")
    elif e == "B" and editor != "":
        del editor[-1]
print("".join(editor))

Submission status: Runtime Error

Solution code:
s = input()
ans = []
for x in s:
    if x == "0" or x == "1":
        ans.append(x)
    else:
        ans.pop()
print("".join(ans))

Submission status: Runtime Error

Solution code:
#include <iostream>
#include <string>
using namespace std;
int main(void){
    string s,S;
    cin >> s;
    for(int i=0;i<s.size();i++){
        if(s[i] == '0') S += '0';
        else if(s[i] == '1') S += '1';
    else S.erase(i-1,i-1);
    }
    cout<<S;
}

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s=input()
l=""
for i in s:
  if i=="B":
    if len(l)!=0:
      l.rstrip()
  elif i=="0":
    l.append(i)
  elif i=="1":
    l.append(i)
print(l)

Submission status: Runtime Error

Solution code:
s=input()
t=[]
for i in s:
    if i=="B" and not len(t):t.pop()
    if i=="0" or i=="1":t.append(i)
print(*t,sep="")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s = input()
ans=[]
for i in range(len(s)):
    if(s[i] == '0' or s[i] == '1'):
        ans.append(s[i])

    else:
        del ans[-1]

for i in range(len(ans)):
    print(ans[i], end ="")

Submission status: Runtime Error

Solution code:
def listToString(_list, split=""):
    maped_list = map(str, _list)  # mapで要素すべてを文字列に
    mojiretu = split.join(maped_list)
    return mojiretu


s = input()
out = []
for i in range(len(s)):
    if s[i] == "0":
        out.append("0")
    elif s[i] == "1":
        out.append("1")
    else:
        out.pop()
print(listToString(out))

Submission status: Runtime Error

Solution code:
line = input()
str = list(line)
ans = []
c = 0

for i in str:
    if (i == "1") or (i == "0"):
        ans.append(i)
    elif i == "B":
        if c != 0:
            c -= 1
            del ans[c]
            c -= 1
    c += 1

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

Submission status: Runtime Error

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

for i in moji:
  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 = input()

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

Submission status: Runtime Error

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

for c in s:
  if c == 'B':
    if s:
      m.pop()
  else:
    m.append(c)

print(''.join(m))

Submission status: Runtime Error

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

s = list(input())
line = []
for w in s:
    if w == '0':
        line.append(w)
    elif w == '1':
        line.append(w)
    elif w == 'B':
        line.pop()

for n in line:
    print('{0}'.format(n), end='')

Submission status: Runtime Error

Solution code:
s = list(input())
line = []
for w in s:
  if w == '0':
    line.append(w)
  elif w == '1':
    line.append(w)
  elif w == 'B':
    line.pop()
    
for n in line:
  print('{0}'.format(n), end='')

Submission status: Runtime Error

Solution code:
S = input()

S_list = list(S)

answer = []
for S_num in range(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)