solved Rightmost Char