program red_scarf
  implicit none
  integer :: n, a(100000) = 0, i, x = 0
  read(*,*) n
  read(*,*) a(1:n)
  do i = 1, n
    x = xor(x, a(i))
  end do
  write(*,'(i0)',advance='no') xor(x, a(1))
  do i = 2, n
    write(*,'(x,i0)',advance='no') xor(x, a(i))
  end do
  write(*,*)
end program red_scarf