import cmath
def f():
 global d
 p=[]
 for i in range(len(d)-1):
  a,b=d[i],d[i+1]
  r=(b-a)/3
  p+=[a,a+r,a+r+r*cmath.rect(1,cmath.pi/3),b-r]
 d=p+[d[-1]]
d=[0j,100+0j]
for _ in[0]*int(input()):f()
for e in d:print(e.real,e.imag) import cmath cmath def f():
 global d
 p=[]
 for i in range(len(d)-1):
  a,b=d[i],d[i+1]
  r=(b-a)/3
  p+=[a,a+r,a+r+r*cmath.rect(1,cmath.pi/3),b-r]
 d=p+[d[-1]] f global d p=[] p [] for i in range(len(d)-1):
  a,b=d[i],d[i+1]
  r=(b-a)/3
  p+=[a,a+r,a+r+r*cmath.rect(1,cmath.pi/3),b-r]
  i range(len(d)-1) range len(d)-1 len(d) len d 1 a,b=d[i],d[i+1] a d[i] d i b d[i+1] d i+1 i 1 r=(b-a)/3 r (b-a)/3 b-a b a 3 p+=[a,a+r,a+r+r*cmath.rect(1,cmath.pi/3),b-r] p [a,a+r,a+r+r*cmath.rect(1,cmath.pi/3),b-r] a a+r a r a+r+r*cmath.rect(1,cmath.pi/3) a+r a r r*cmath.rect(1,cmath.pi/3) r cmath.rect(1,cmath.pi/3) cmath.rect cmath rect 1 cmath.pi/3 cmath.pi cmath pi 3 b-r b r d=p+[d[-1]] d p+[d[-1]] p [d[-1]] d[-1] d -1 d=[0j,100+0j] d [0j,100+0j] 0j 100+0j 100 0j for _ in[0]*int(input()):f() _ [0]*int(input()) [0] 0 int(input()) int input() input for e in d:print(e.real,e.imag) e d d=[0j,100+0j] [0j,100+0j] d def f():
 global d
 p=[]
 for i in range(len(d)-1):
  a,b=d[i],d[i+1]
  r=(b-a)/3
  p+=[a,a+r,a+r+r*cmath.rect(1,cmath.pi/3),b-r]
 d=p+[d[-1]] def f():
 global d
 p=[]
 for i in range(len(d)-1):
  a,b=d[i],d[i+1]
  r=(b-a)/3
  p+=[a,a+r,a+r+r*cmath.rect(1,cmath.pi/3),b-r]
 d=p+[d[-1]] f
import cmath
def f():
 global d
 p=[]
 for i in range(len(d)-1):
  a,b=d[i],d[i+1]
  r=(b-a)/3
  p+=[a,a+r,a+r+r*cmath.rect(1,cmath.pi/3),b-r]
 d=p+[d[-1]]
d=[0j,100+0j]
for _ in[0]*int(input()):f()
for e in d:print(e.real,e.imag)
