N = input()
a = input()
Ni = int(N)-1
l = a.split()
temp = 0

for i in reversed(range(int(len(l)+1))):
  for j in reversed(range(i)):
    print("1")
    print(l[j])
    print(i)
    if l[j] > l[j-1]:
      l[j],l[j-1] = l[j-1],l[j]
      print("2")
      print(l)

print(l)

for i in range(int(Ni)):
  print(l)
  temp = (float(l[i])+float(l[i+1]))/2
  del l[:1]
  print(l)
  l.insert(1, temp)
  print(l)
  
print(temp)