This is one of my questions for my exam ..
We are not supposed to use
mesg y/n for this but we should effectively avoid mesgs along with the problem of not being able to change groups.
chmod 620 `tty`
chmod 600 `tty`
i.e. enabling and disabling group write access to the tty device.