function main(input) {
  const inputs =input.split('\n')
  const [N] = inputs[0].split(' ').map(Number)
  const A = inputs[1].split(' ').map(Number)

  for(let i = 0; i < N; i++) {
    let r = null
    for (let j = 0; j < N; j++) {
      if (i === j) continue
      if (r === null) r = A[j]
      else r = r ^ A[j]
    }
    console.log(r)
  }
}

main(require('fs').readFileSync('/dev/stdin', 'utf8').trim())
