'use strict';
process.stdin.on('data', function(chunk) {
    var inputs = chunk.toString().trim();
  var expressions = inputs.split('\n');
  for (var i = 0; i < expressions.length; i++) {
  	if (expressions[i] === '0 ? 0'){
  		break;
  	}
  	console.log(expressions[i]);
  }
});
process.stdin.resume();
process.stdin.setEncoding('utf8');