結果 : write ac function to reverse a string using stack