#!/usr/bin/env python
#
# Find the place of minimum in tail of a list
# MyName  MyUser@MyMail.mok

import sys

if len(sys.argv) < 3:
    sys.stderr.write("Usage: %s <tailStart> <number1> <number2> ...\n" % 
                     sys.argv[0])
    sys.exit(1)

# Tail begin index
tb = int(sys.argv[1])

###################
# Get the numbers #
###################
a = [] # start empty list
i = 2; # Start after program name and tail-index
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 

##############################################################
# Find where is the minimum in the tail that starts in a[tb] #
##############################################################

# !!!!!!  Homework place  !!!!!!

sys.stdout.write("Tail begins in [%d] place. Minimum is in the [%d] place.\n" % 
                 (tb, i))
sys.exit(0)
