class Solution:

    def reverseString(self, s):
        """
        :type s: str
        :rtype: str
        """
        p, q = 0, len(s) - 1
        res = list(s)
        while p < q:
            res[p], res[q] = res[q], res[p]
            p += 1
            q -= 1
        return ''.join(res)

fada48439d7f17a9dfa9668a4049dc4b1a4d168b
<mask token>

class Solution:
    <mask token>

class Solution:

    def reverseString(self, s):
        """
        :type s: str
        :rtype: str
        """
        p, q = 0, len(s) - 1
        res = list(s)
        while p < q:
            res[p], res[q] = res[q], res[p]
            p += 1
            q -= 1
        return ''.join(res)
