from typing import Any


class Timeout(object):
    def __init__(
        self,               # type: Timeout
        minutes,            # type: int
        seconds,            # type: int
        milliseconds,       # type: int
        microseconds,       # type: int
    ):
        # type: (...) -> None

        self.minutes = minutes
        self.seconds = seconds
        self.milliseconds = milliseconds
        self.microseconds = microseconds

    def __eq__(
        self,       # type: Timeout
        other,      # type: Any
    ):
        # type: (...) -> bool

        if not isinstance(other, Timeout):
            return False

        return (
            self.minutes == other.minutes and
            self.seconds == other.seconds and
            self.milliseconds == other.milliseconds and
            self.microseconds == other.microseconds
        )

    def __ne__(
        self,       # type: Timeout
        other,      # type: Any
    ):
        # type: (...) -> bool

        return not self.__eq__(other)

    def __str__(
        self,       # type: Timeout
    ):
        # type: (...) -> str

        return str({
            "minutes": self.minutes,
            "seconds": self.seconds,
            "milliseconds": self.milliseconds,
            "microseconds": self.microseconds
        })
