a=[[0,'']] exec'n=input();a+=[[n&1,n]];'*20 for b,n in sorted(a):print n