function main(input) {
    input = input.split("\n");
	tmp = input[0].split(" ");
	var humanCount = parseInt(tmp[0], 10);
	var sweetCount = parseInt(tmp[1], 10);
	var target = new Array(humanCount)
	for (var i = 0; i < sweetCount; i++) {
		var safeHumanList = input[i*2+2].split(" ");
		for (var n = 0; n < safeHumanList.length; n++) {
			const safeHuman = safeHumanList[n]-1;
			target[safeHuman] = true;
		}
	}
	var output = "";
	for (var i = 0; i < target.length; i++) {
		if (!target[i]) {
			output += (i + 1) + " ";
		}
	}
	output.slice(0, -1) ;
	//出力
	console.log(output);
}
var input = require('fs').readFileSync('/dev/stdin', 'utf8');
main(input);