Think of using one stack as temporary storage.