 
  
   
  
   
  
   
  
   
  
   
  
   
  
  
if (arr[i + 1] + 1 === arr[i + 2]) {
str += ',' + arr[i + 1]
}
 
  
   
  
   
  
   
  
  const buf = Buffer.allocUnsafe(1000)
let pos = 0
const fs = require('fs')
const path = require('path')
const fd = path.join(__dirname, '/input.txt')
var fp = fs.openSync(fd, 'r')
fs.read(fp, buf, 0, 4, pos, function (err, bytesRead, buff) {
  if (err) return
  const stringsAmount = buff.toString('utf8')
    .split('\n')[0]
  pos += stringsAmount.length + 1
  const length = stringsAmount * 10
  readNextChunk()
  const array = []
  function readNextChunk () {
    fs.read(fp, buf, 0, length, pos,
      function (err) {
        if (err) throw err
        const arrstr = buf.toString('utf8').split('\n')[0]
        const arr = arrstr.split(' ')
        for (let i = 1; i < arr.length; i++) {
          if (array[arr[i]]) {
            array[arr[i]]++
          } else {
            array[arr[i]] = 1
          }
        }
        pos += arrstr.length + 1
        if (pos <= stringsAmount * 15) {
          readNextChunk()
        } else {
          for (let i = 0; i < 101; i++) {
            if (array[i]) {
              for (let j = 0; j < array[i]; j++) {
                process.stdout.write(i.toString() + ' ')
              }
            }
          }
        }
      })
  }
}) 
  
   
  
   
  
   
  
  