class CQueue {
    private Stack stack1;
    private Stack stack2;
    public CQueue() {
    this.stack1 = new Stack<>();
    this.stack2 = new Stack<>();
    }

    public void appendTail(int value) {
    stack1.push(value);
    }
    public int deleteHead() {
    if(stack2.isEmpty()){
    while(!stack1.isEmpty()){
    stack2.push(stack1.pop());
    }
    }
    if(stack2.isEmpty()){
    return -1;
    }
    else{
    return stack2.pop();
    }
    }
    }