public static MyStack<Integer> duplicateStack(MyStack<Integer> original) {
		MyStack<Integer> result = new ArrayStack<Integer>();
		MyQueue<Integer> temp = new ArrayQueue<Integer>();
		
		/*reverse the order of original elements*/
		while(!original.isEmpty()){
			temp.enqueue(original.pop());
		}
		while(!temp.isEmpty()){
			original.push(temp.dequeue());
		}
		
		/*copy element to new stack*/
		while(!original.isEmpty()){
			result.push(original.peek());
			/*put original elements to queue*/
			temp.enqueue(original.pop());
		}
		
		/*restore original*/
		while(!temp.isEmpty()){
			original.push(temp.dequeue());
		}
		
		return result; // remove this line when you are done
	}