xxxxxxxxxx
def ruler_pattern(n):
pattern = 1
for i in range(2,n+1):
pattern=str(pattern)+" "+str(i)+" "+str(pattern)
return(pattern)
a = ruler_pattern(5)
print(a)