class Solution:
    def slowestKey(self, releaseTimes: List[int], keysPressed: str) -> str:
        rts = [0] + releaseTimes
        max_ = -1
        ch = '#'
        n = len(keysPressed)
        for i in range(n):
            if max_ < rts[i+1] - rts[i] or (max_ == rts[i+1] - rts[i] and ord(keysPressed[i]) > ord(ch)):
                max_ = rts[i+1] - rts[i]
                ch = keysPressed[i]
        return ch
            
dcce81dccf2e8d18a8f26d8cfe3772f266916c10
<mask token>

class Solution:
    <mask token>

class Solution:

    def slowestKey(self, releaseTimes: List[int], keysPressed: str) ->str:
        rts = [0] + releaseTimes
        max_ = -1
        ch = '#'
        n = len(keysPressed)
        for i in range(n):
            if max_ < rts[i + 1] - rts[i] or max_ == rts[i + 1] - rts[i
                ] and ord(keysPressed[i]) > ord(ch):
                max_ = rts[i + 1] - rts[i]
                ch = keysPressed[i]
        return ch

class Solution:
    def slowestKey(self, releaseTimes: List[int], keysPressed: str) -> str:
        rts = [0] + releaseTimes
        max_ = -1
        ch = '#'
        n = len(keysPressed)
        for i in range(n):
            if max_ < rts[i+1] - rts[i] or (max_ == rts[i+1] - rts[i] and ord(keysPressed[i]) > ord(ch)):
                max_ = rts[i+1] - rts[i]
                ch = keysPressed[i]
        return ch
            