def next(self) -> str:
    if self.hasNext():
        res = self.res[self.counter]
        self.counter += 1
        return res
def next(self) -> str:
    if self.hasNext():
        res = self.res[self.counter]
        self.counter += 1
        return res