#-------------------------------------------------------------------------------
#  Sort4.py
#  Sorts four numbers in ascending order
#-------------------------------------------------------------------------------

print('Enter four numbers.')
a = float(input('First number: '))
b = float(input('Second number: '))
c = float(input('Third number: '))
d = float(input('Fourth number: '))

# -----------------------
if a>b:    #compare a, b
   temp=a
   a=b
   b=temp
if b>c:    #compare b, c
   temp=b
   b=c
   c=temp
if c>d:    #compare c, d
   temp=c
   c=d
   d=temp
# ---------------------- largest now in d

# ----------------------
if a>b:    #compare a, b
   temp=a
   a=b
   b=temp
if b>c:    #compare b, c
   temp=b
   b=c
   c=temp
# ----------------------- second largest in c

# -----------------------
if a>b:    #compare a, b
   temp=a
   a=b
   b=temp
# ----------------------- third largest in b

print(a,b,c,d)