    	function Main(input){
    		var input = input.split(/\r\n|\r|\n/);
        	var n = parseInt(input[0],10);
        	var a = input[1].split("");
        	var b = input[2].split("");
        	var c = input[3].split("");
        	var point = new Array(3);
        	point[0] = 0;
        	point[1] = 0;
        	point[2] = 0;
        	var cnt = 0;
        	console.log('%d %s',n[0],a[0],b[0],c[0]);
        	while (cnt < n) {
        		if (a[cnt] == b[cnt]){
        			point[0]++;
        		}
        		cnt++; 
    		}
    		var cnt = 0;
    		while (cnt < n) {
        		if (a[cnt] == c[cnt]){
        			point[1]++;
        		}
        		cnt++; 
    		}
    		var cnt = 0;
    		while (cnt < n) {
        		if (b[cnt] == c[cnt]){
        			point[2]++;
        		}
        		cnt++; 
    		}
    		point.sort();
    		ans = point[0]+point[1];
    		    	console.log('%d %s',point[0],point[1],point[2]);
    		}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));