#!/bin/python
a=[1,2,3,4,5,6]
#a=[6,5,4,3,2,1]
flag = False
for i in range(0,len(a)-1):
# print ("FLAG" + str(flag))
if flag :
break
flag = True
for j in range(0,len(a)-i-1):
if a[j]>a[j+1]:
tmp = a[j]
a[j] = a[j+1]
a[j+1] = tmp
flag = False
# print flag
print a