output_description: Print 1 if x is equal to 0, or 0 if x is equal to 1.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      x
attempt: n = int(input())
  import sys
  
  a = list(map(int, input().split()))
  b = list(map(int, input().split()))
  d = {}
  if n == 1:
      if a == b:
          print("No")
      else:
          print("Yes")
      sys.exit()
  possible = True
  for x in b:
      if d.get(x) == None:
          d[x] = 1
      else:
          d[x] += 1
      if d[x] > (n) // 2:
          possible = False
          break
  if not possible:
      print("No")
  else:
      b.sort(reverse=True)
      k = 0
      j = n - 1
      turn = True
      for i in range(0, n):
          # print(turn)
          if b[i] == a[i]:
              if turn:
                  # swap(a[k],a[i])
                  b[k], b[i] = b[i], b[k]
                  k += 1
              else:
                  # swap(a[j],a[i])
                  b[j], b[i] = b[i], b[j]
                  j -= 1
              turn = not turn
      print(b)
  
problem_description: Statement
  
  Given is an integer x that is greater than or equal to 0, and less than or
  equal to 1. Output 1 if x is equal to 0, or 0 if x is equal to 1.
samples: [{"input": "1", "output": "0\n    \n\n* * *"}, {"input": "0", "output": "1"}]