<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def interact(self):
 """Interaction function, emulates a very dumb telnet client."""

        if sys.platform == "win32":
            self.mt_interact()
            return
        while True:
            rfd, wfd, xfd = select.select([self, sys.stdin], [], [])
            if self in rfd:
                try:
                    text = self.read_eager()
                except EOFError:
                    print('*** Connection closed by remote host ***')
                    break
                if text:
                    self.stdout.write(text)
                    self.stdout.flush()
            if sys.stdin in rfd:
                line = sys.stdin.readline()
                if not line:
                    break
                self.write(line)