var read_stdin = function(f){process.stdin.read_all(function(e,ι){f((ι+'').replace(/\n$/,''))})} read_stdin(function(ι){ var t=[]; [...ι].sort()._.uniq(true).map(function(ι){ι = ι.charCodeAt(); t[-1]&&t[-1][1] === ι-1? (t[-1][1] = ι) : t.push([ι,ι])}) var x = function(ι){ι = String.fromCharCode(ι); return {'-':1,']':1,'\\':1}[ι]? '\\'+ι : ι==="'"? ι : util.inspect(ι).slice(1,-1).replace(/\\u00/g,'\\x')} ι = t.map(function(ι){return ι[0] === ι[1]? x(ι[0]) : ι[0] === ι[1]-1? x(ι[0])+x(ι[1]) : x(ι[0])+'-'+x(ι[1])}).join('') process.stdout.write(ι) })