class stack:

    def __init__(self):
        self.s = []

    def push(self, x):
        if self.s:
            self.s += [(x, min(x, self.s[-1][1]))]
        else:
            self.s += [(x, x)]

    def pop(self):
        if not self.s:
            return -1
        return self.s.pop()[0]

    def getMin(self):
        if not self.s:
            return -1
        return self.s[-1][1]

2a597136eda33631acaf9890ee00de4b6b71ca03
class stack:

    def __init__(self):
        self.s = []
    <mask token>
    <mask token>
    <mask token>

class stack:

    def __init__(self):
        self.s = []
    <mask token>
    <mask token>

    def getMin(self):
        if not self.s:
            return -1
        return self.s[-1][1]

class stack:

    def __init__(self):
        self.s = []
    <mask token>

    def pop(self):
        if not self.s:
            return -1
        return self.s.pop()[0]

    def getMin(self):
        if not self.s:
            return -1
        return self.s[-1][1]

class stack:

    def __init__(self):
        self.s = []

    def push(self, x):
        if self.s:
            self.s += [(x, min(x, self.s[-1][1]))]
        else:
            self.s += [(x, x)]

    def pop(self):
        if not self.s:
            return -1
        return self.s.pop()[0]

    def getMin(self):
        if not self.s:
            return -1
        return self.s[-1][1]
