n=int(input())
p1=[float(0),float(0)]
p2=[float(100),float(0)]
cos=0.5
sin=0.866025404
def koh(d,p1,p2):
    if d==0:return True
    sx = (2 * p1[0] + p2[0]) / 3
    sy = (2 * p1[1] + p2[1]) / 3
    tx = (p1[0] + 2 * p2[0]) / 3
    ty = (p1[1] + 2 * p2[1]) / 3
    ux=(tx-sx)*cos-(ty-sy)*sin+sx
    uy=(tx-sx)*sin+(ty-sy)*cos+sy

    koh(d-1,p1,[sx,sy])
    print(sx, sy)
    koh(d-1,[sx,sy],[ux,uy])
    print(ux, uy)
    koh(d-1,[ux,uy],[tx,ty])
    print(tx,ty)
    koh(d-1,[tx,ty],p2)
print(p1[0],p1[1])
koh(n,p1,p2)
print(p2[0],p2[1]) n=int(input()) n int(input()) int input() input p1=[float(0),float(0)] p1 [float(0),float(0)] float(0) float 0 float(0) float 0 p2=[float(100),float(0)] p2 [float(100),float(0)] float(100) float 100 float(0) float 0 cos=0.5 cos 0.5 sin=0.866025404 sin 0.866025404 def koh(d,p1,p2):
    if d==0:return True
    sx = (2 * p1[0] + p2[0]) / 3
    sy = (2 * p1[1] + p2[1]) / 3
    tx = (p1[0] + 2 * p2[0]) / 3
    ty = (p1[1] + 2 * p2[1]) / 3
    ux=(tx-sx)*cos-(ty-sy)*sin+sx
    uy=(tx-sx)*sin+(ty-sy)*cos+sy

    koh(d-1,p1,[sx,sy])
    print(sx, sy)
    koh(d-1,[sx,sy],[ux,uy])
    print(ux, uy)
    koh(d-1,[ux,uy],[tx,ty])
    print(tx,ty)
    koh(d-1,[tx,ty],p2) koh if d==0:return True
     d==0 d 0 sx = (2 * p1[0] + p2[0]) / 3 sx (2 * p1[0] + p2[0]) / 3 2 * p1[0] + p2[0] 2 * p1[0] 2 p1[0] p1 0 p2[0] p2 0 3 sy = (2 * p1[1] + p2[1]) / 3 sy (2 * p1[1] + p2[1]) / 3 2 * p1[1] + p2[1] 2 * p1[1] 2 p1[1] p1 1 p2[1] p2 1 3 tx = (p1[0] + 2 * p2[0]) / 3 tx (p1[0] + 2 * p2[0]) / 3 p1[0] + 2 * p2[0] p1[0] p1 0 2 * p2[0] 2 p2[0] p2 0 3 ty = (p1[1] + 2 * p2[1]) / 3 ty (p1[1] + 2 * p2[1]) / 3 p1[1] + 2 * p2[1] p1[1] p1 1 2 * p2[1] 2 p2[1] p2 1 3 ux=(tx-sx)*cos-(ty-sy)*sin+sx ux (tx-sx)*cos-(ty-sy)*sin+sx (tx-sx)*cos-(ty-sy)*sin (tx-sx)*cos tx-sx tx sx cos (ty-sy)*sin ty-sy ty sy sin sx uy=(tx-sx)*sin+(ty-sy)*cos+sy uy (tx-sx)*sin+(ty-sy)*cos+sy (tx-sx)*sin+(ty-sy)*cos (tx-sx)*sin tx-sx tx sx sin (ty-sy)*cos ty-sy ty sy cos sy koh(d-1,p1,[sx,sy]) koh d-1 d 1 p1 [sx,sy] sx sy print(sx, sy) print sx sy koh(d-1,[sx,sy],[ux,uy]) koh d-1 d 1 [sx,sy] sx sy [ux,uy] ux uy print(ux, uy) print ux uy koh(d-1,[ux,uy],[tx,ty]) koh d-1 d 1 [ux,uy] ux uy [tx,ty] tx ty print(tx,ty) print tx ty koh(d-1,[tx,ty],p2) koh d-1 d 1 [tx,ty] tx ty p2 d d p1 p1 p2 p2 print(p1[0],p1[1]) print p1[0] p1 0 p1[1] p1 1 koh(n,p1,p2) koh n p1 p2 print(p2[0],p2[1]) print p2[0] p2 0 p2[1] p2 1 cos=0.5 0.5 cos p1=[float(0),float(0)] [float(0),float(0)] p1 def koh(d,p1,p2):
    if d==0:return True
    sx = (2 * p1[0] + p2[0]) / 3
    sy = (2 * p1[1] + p2[1]) / 3
    tx = (p1[0] + 2 * p2[0]) / 3
    ty = (p1[1] + 2 * p2[1]) / 3
    ux=(tx-sx)*cos-(ty-sy)*sin+sx
    uy=(tx-sx)*sin+(ty-sy)*cos+sy

    koh(d-1,p1,[sx,sy])
    print(sx, sy)
    koh(d-1,[sx,sy],[ux,uy])
    print(ux, uy)
    koh(d-1,[ux,uy],[tx,ty])
    print(tx,ty)
    koh(d-1,[tx,ty],p2) def koh(d,p1,p2):
    if d==0:return True
    sx = (2 * p1[0] + p2[0]) / 3
    sy = (2 * p1[1] + p2[1]) / 3
    tx = (p1[0] + 2 * p2[0]) / 3
    ty = (p1[1] + 2 * p2[1]) / 3
    ux=(tx-sx)*cos-(ty-sy)*sin+sx
    uy=(tx-sx)*sin+(ty-sy)*cos+sy

    koh(d-1,p1,[sx,sy])
    print(sx, sy)
    koh(d-1,[sx,sy],[ux,uy])
    print(ux, uy)
    koh(d-1,[ux,uy],[tx,ty])
    print(tx,ty)
    koh(d-1,[tx,ty],p2) koh sin=0.866025404 0.866025404 sin p2=[float(100),float(0)] [float(100),float(0)] p2 n=int(input()) int(input()) n
n=int(input())
p1=[float(0),float(0)]
p2=[float(100),float(0)]
cos=0.5
sin=0.866025404
def koh(d,p1,p2):
    if d==0:return True
    sx = (2 * p1[0] + p2[0]) / 3
    sy = (2 * p1[1] + p2[1]) / 3
    tx = (p1[0] + 2 * p2[0]) / 3
    ty = (p1[1] + 2 * p2[1]) / 3
    ux=(tx-sx)*cos-(ty-sy)*sin+sx
    uy=(tx-sx)*sin+(ty-sy)*cos+sy

    koh(d-1,p1,[sx,sy])
    print(sx, sy)
    koh(d-1,[sx,sy],[ux,uy])
    print(ux, uy)
    koh(d-1,[ux,uy],[tx,ty])
    print(tx,ty)
    koh(d-1,[tx,ty],p2)
print(p1[0],p1[1])
koh(n,p1,p2)
print(p2[0],p2[1])
