function main(arg){
  	var out = arg.trim().split('\n');
	var u = out[2];
	var s = out[0].split(' ');
  	var t = out[1].split(' ').map(str => parseInt(str, 10)); 
  	
	if (s === u){
    	t[0]--;
    }
	
  	var ms = t.join(' ');
  	console.log(ms);
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));