Messages are transferred by words on seven bits, four of which are main and three are checkout. In information transfer sometimes errors of the first multiplicity appear.
Task. To restore the original message if there was an error.
Notes. Errors in two and more bits can’t be. Bits are numbered from right to left. Test bits are set as follows:
Stream. The input stream sets decimal presentation of the accepted seven information bit. The output stream should return the restored message in the decimal form (an integer from 0 to 127).