Ups and Downs- Please help in figuring out the issue

This code is throwing NZEC Runtime error. Please help.

def Change(elements, size):  
  if size in (0,1,2):
    pass
  elif size == 3:
    elements[1],elements[2] = elements[2], elements[1]
  else:
    for j in range(1, size-2, 2):
      elements[j], elements[j+1] = elements[j+1], elements[j]

def main():
  tCases = int(raw_input().strip())
  ans = []
  for i in range(tCases):
    size = int (raw_input().strip())
    elements = map(int, raw_input().split(' '))
    elements.sort()
    Change(elements, size)   
    ans.append(elements)

  for res in ans:
    print res

if __name__ == '__main__':
  main()
//