class NotBolsheError(Exception):
    def __init__(self):
        pass


class BolsheMensher(object):
    def __init__(self, a, b):
        self.a = a
        self.b = b

    def __str__(self):
        try:
            self.menshe(is_a=True)
        except NotBolsheError:
            try:
                self.menshe(is_a=False)
            except NotBolsheError:
                return 'A ravno B'
            else:
                return 'A bolshe B'
        else:
            return 'A menshe B'

    def _set_operands(self, is_a):
        return (self.a, self.b) if is_a else (self.b, self.a)

    def bolshe(self, is_a):
        a, b = self._set_operands(is_a)
        if a > b:
            return True
        raise NotBolsheError

    def ravno(self, is_a):
        a, b = self._set_operands(is_a)
        if a == b:
            return True
        self.bolshe(is_a)

    def menshe(self, is_a):
        '''Wrapper over bolshe and ravno methods for user convenience.'''
        is_ravno = False
        try:
            is_ravno = self.ravno(is_a)
        except NotBolsheError:
            # Safe to return true there.
            return True

        if is_ravno:
            # Return NotBolsheError since it is also a case.
            raise NotBolsheError
        return True


print(BolsheMensher(6, 4))
