#!/usr/bin/env python
#
# 'Minimal Sort' of list of integer numbers 
#

import sys

if len(sys.argv) == 1:
    sys.stderr.write("Usage: %s <N1> <N2> ... <Nn>\n" % sys.argv[0])
    sys.exit(1)

#################################
# Get the numbers into a list a #
#################################
a = [] # start empty list
i = 1; # Start after program name
while i < len(sys.argv):
    n = int(sys.argv[i]) # Number from a string
    a.append(n)          # Add the new number to the list
    i = i + 1            # Next 

#################
# Sort the list #
#################
sorted = 0 # How many already sorted. Also the tail begin.
while sorted < len(a):

    # Find the minimum place in the tail  a[sorted], a[sorted+1], ...
    m = sorted
    # ...


    # Swap  a[sorted] <<-->> a[m]
    # ...

    sorted += 1
 
#######################################
# Write the sorted list (as a string) #
#######################################
sys.stdout.write("%s\n" % a)
sys.exit(0)
