import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String[] ary = s.split("");
        List<String> sary = new ArrayList<>();
        for (int i = 0; i < ary.length; i++) {
            String a = ary[i];
            if (a.equals("0") || a.equals("1")) {
                sary.add(a);
            } else if (sary.size() != 0){
                sary.remove(sary.size() - 1);
            }
        }
        for (String ans: sary) {
            System.out.print(ans);
        }
    }
} import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String[] ary = s.split("");
        List<String> sary = new ArrayList<>();
        for (int i = 0; i < ary.length; i++) {
            String a = ary[i];
            if (a.equals("0") || a.equals("1")) {
                sary.add(a);
            } else if (sary.size() != 0){
                sary.remove(sary.size() - 1);
            }
        }
        for (String ans: sary) {
            System.out.print(ans);
        }
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String[] ary = s.split("");
        List<String> sary = new ArrayList<>();
        for (int i = 0; i < ary.length; i++) {
            String a = ary[i];
            if (a.equals("0") || a.equals("1")) {
                sary.add(a);
            } else if (sary.size() != 0){
                sary.remove(sary.size() - 1);
            }
        }
        for (String ans: sary) {
            System.out.print(ans);
        }
    } main {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String[] ary = s.split("");
        List<String> sary = new ArrayList<>();
        for (int i = 0; i < ary.length; i++) {
            String a = ary[i];
            if (a.equals("0") || a.equals("1")) {
                sary.add(a);
            } else if (sary.size() != 0){
                sary.remove(sary.size() - 1);
            }
        }
        for (String ans: sary) {
            System.out.print(ans);
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc String[] ary = s.split(""); ary s.split("") s.split s "" List<String> sary = new ArrayList<>(); sary new ArrayList<>() for (int i = 0; i < ary.length; i++) {
            String a = ary[i];
            if (a.equals("0") || a.equals("1")) {
                sary.add(a);
            } else if (sary.size() != 0){
                sary.remove(sary.size() - 1);
            }
        } int i = 0; int i = 0; i 0 i < ary.length i ary.length ary ary.length i++ i++ i {
            String a = ary[i];
            if (a.equals("0") || a.equals("1")) {
                sary.add(a);
            } else if (sary.size() != 0){
                sary.remove(sary.size() - 1);
            }
        } {
            String a = ary[i];
            if (a.equals("0") || a.equals("1")) {
                sary.add(a);
            } else if (sary.size() != 0){
                sary.remove(sary.size() - 1);
            }
        } String a = ary[i]; a ary[i] ary i if (a.equals("0") || a.equals("1")) {
                sary.add(a);
            } else if (sary.size() != 0){
                sary.remove(sary.size() - 1);
            } a.equals("0") || a.equals("1") a.equals("0") a.equals a "0" a.equals("1") a.equals a "1" {
                sary.add(a);
            } sary.add(a) sary.add sary a if (sary.size() != 0){
                sary.remove(sary.size() - 1);
            } sary.size() != 0 sary.size() sary.size sary 0 {
                sary.remove(sary.size() - 1);
            } sary.remove(sary.size() - 1) sary.remove sary sary.size() - 1 sary.size() sary.size sary 1 for (String ans: sary) {
            System.out.print(ans);
        } String ans sary {
            System.out.print(ans);
        } {
            System.out.print(ans);
        } System.out.print(ans) System.out.print System.out System System.out ans String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String[] ary = s.split("");
        List<String> sary = new ArrayList<>();
        for (int i = 0; i < ary.length; i++) {
            String a = ary[i];
            if (a.equals("0") || a.equals("1")) {
                sary.add(a);
            } else if (sary.size() != 0){
                sary.remove(sary.size() - 1);
            }
        }
        for (String ans: sary) {
            System.out.print(ans);
        }
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String[] ary = s.split("");
        List<String> sary = new ArrayList<>();
        for (int i = 0; i < ary.length; i++) {
            String a = ary[i];
            if (a.equals("0") || a.equals("1")) {
                sary.add(a);
            } else if (sary.size() != 0){
                sary.remove(sary.size() - 1);
            }
        }
        for (String ans: sary) {
            System.out.print(ans);
        }
    }
} Main
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String[] ary = s.split("");
        List<String> sary = new ArrayList<>();
        for (int i = 0; i < ary.length; i++) {
            String a = ary[i];
            if (a.equals("0") || a.equals("1")) {
                sary.add(a);
            } else if (sary.size() != 0){
                sary.remove(sary.size() - 1);
            }
        }
        for (String ans: sary) {
            System.out.print(ans);
        }
    }
}