program main
    use,intrinsic :: iso_fortran_env
    implicit none

    integer(int32) :: n, i
    integer(int32),allocatable :: a(:)
    integer(int32),allocatable :: x(:)
    integer(int32) :: s

    read *, n
    allocate(a(n))
    read *, (a(i), i = 1, n)
    allocate(x(n))

    s = 0
    do i = 1, n
        s = ieor(s, a(i))
    enddo

    do i = 1, n
        x(i) = ieor(s, a(i))
    enddo

    print '(*(i0,:,1x))', (x(i), i = 1,n)

end program main
