function main(arg) {
	var b = arg.split("\n")[1].split(" ").map(Number)
	b = b.sort((a, b) => a - b)
	var n = b.length
	var missed = false
	for (var i = 0; i < n; i++ ) {
		var max = i + 1
		var bi = b[i]
		if (bi > max) {
			missed = true
		}
	}
	if (missed) {
		console.log(-1)
	} else {
		for (var j = 0; j < b.length; j++) {
			console.log(b[j])
		}
	}
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));