#lab3

'''here are some notes

in order to get at least partial credit be sure to submit exactly the way he wants it
if the autotester crashes you get nothing

'''
x=0
y=1
for i in range(0,10):
	print y
	z=x+y
	x=y
	y=z
# This is an example of a program that will take in arguments.
# It is best to name your arguments rather than relying on position;
# this enables a user to use your program without memorizing
# argument order. This is a standard industrial practice.
# Below, you see that there are two named arguments that each take
# an additional parameter:
# --fin <ADDITIONAL-PARAM> --fout <ADDITIONAL-PARAM>
# This may be used in a program that takes in the name of
# an input and output file, in order to do further processing.
# You may modify this template for your purposes.
#
# The loop that is iterating over all the input arguments begins at
# 1, since sys.argv[0] is always the name of the program
# (in this case, "argtest.py", unless you renamed it).
# The loop is incrementing one arg at a time; since --fin and --fout
# take an additional argument, I created a variable called "skip"
# that enables you to skip over the filename during the looping
# since the --fin and --fout processing will always look at and
# consume the next argument. Note that I test to ensure
# --fin or --fout always have a trailing argument. Otherways, the
# program will give an "out of range" warning.
#
# This is course content. You must understand this. To understand this
# use it, modify it and experiment with it.
#
# usage: python argtest.py --fin blah_in --fout blah_out
# where you may change the names blah_in and blah_out as needed
#
# mathaine@ecf.utoronto.ca

c = [[1,10,100,-40],
[5,6,17,30],
[3,12,11,17]]

5.0, 6.0, 17.0, 30.0
3.0, 12.0, 11.0, 17.0
1.0, 10.0, 100.0, -40.0

d = (c)
for l in d:
	p=str(l)
	p =p.replace("[", "")
	p =p.replace("]", "")
	print p
exit()
print str(c)[1:-1].replace("],", "\n")


def genSortKey(col,up):
     def key(x):
         return x[col] if up else -x[col]
     return key


import sys

FIN=""
FOUT=""
nargs=len(sys.argv)
skip=False
for i in range(1,nargs):
   if not skip:
      arg=sys.argv[i]
      print "INFO: processing",arg
      if arg == "--fin":
         if i != nargs-1:
            FIN=sys.argv[i+1]
            skip=True
      elif arg == "--fout":
         if i != nargs-1:
            FOUT=sys.argv[i+1]
            skip=True
      else:
         print "ERR: unknown arg:",arg
   else:
      skip=False

print "INFO: FIN",FIN
print "INFO: FOUT",FOUT