import math
n = int(input())

start = (0,0)
end = (100,0)

def koch(n,p1,p2):
    if n == 0:
        return

    s = ( (p1[0]*2 + p2[0])/3, (p1[1] *2 + p2[1])/3 )
    t = ( (p1[0] + p2[0]*2)/3, (p1[1] + p2[1] *2)/3 )

    ux = (t[0] - s[0])/2 - (t[1] - s[1])*math.sqrt(3)/2 + s[0]
    uy = (t[0] - s[0])*math.sqrt(3)/2 + (t[1] - s[1])/2 + s[1]
    u = (ux, uy)
    koch(n-1,p1, s)
    ppp(s)
    koch(n-1, s, u)
    ppp(u)
    koch(n-1, u, t)
    ppp(t)
    koch(n-1, t,p2)

def ppp(t):
    print("{:.08f} {:.08f}".format(t[0],t[1]))

ppp(start)
koch(n,start,end)
ppp(end)
 import math math n = int(input()) n int(input()) int input() input start = (0,0) start (0,0) 0 0 end = (100,0) end (100,0) 100 0 def koch(n,p1,p2):
    if n == 0:
        return

    s = ( (p1[0]*2 + p2[0])/3, (p1[1] *2 + p2[1])/3 )
    t = ( (p1[0] + p2[0]*2)/3, (p1[1] + p2[1] *2)/3 )

    ux = (t[0] - s[0])/2 - (t[1] - s[1])*math.sqrt(3)/2 + s[0]
    uy = (t[0] - s[0])*math.sqrt(3)/2 + (t[1] - s[1])/2 + s[1]
    u = (ux, uy)
    koch(n-1,p1, s)
    ppp(s)
    koch(n-1, s, u)
    ppp(u)
    koch(n-1, u, t)
    ppp(t)
    koch(n-1, t,p2) koch if n == 0:
        return

     n == 0 n 0 return s = ( (p1[0]*2 + p2[0])/3, (p1[1] *2 + p2[1])/3 ) s ( (p1[0]*2 + p2[0])/3, (p1[1] *2 + p2[1])/3 ) (p1[0]*2 + p2[0])/3 p1[0]*2 + p2[0] p1[0]*2 p1[0] p1 0 2 p2[0] p2 0 3 (p1[1] *2 + p2[1])/3 p1[1] *2 + p2[1] p1[1] *2 p1[1] p1 1 2 p2[1] p2 1 3 t = ( (p1[0] + p2[0]*2)/3, (p1[1] + p2[1] *2)/3 ) t ( (p1[0] + p2[0]*2)/3, (p1[1] + p2[1] *2)/3 ) (p1[0] + p2[0]*2)/3 p1[0] + p2[0]*2 p1[0] p1 0 p2[0]*2 p2[0] p2 0 2 3 (p1[1] + p2[1] *2)/3 p1[1] + p2[1] *2 p1[1] p1 1 p2[1] *2 p2[1] p2 1 2 3 ux = (t[0] - s[0])/2 - (t[1] - s[1])*math.sqrt(3)/2 + s[0] ux (t[0] - s[0])/2 - (t[1] - s[1])*math.sqrt(3)/2 + s[0] (t[0] - s[0])/2 - (t[1] - s[1])*math.sqrt(3)/2 (t[0] - s[0])/2 t[0] - s[0] t[0] t 0 s[0] s 0 2 (t[1] - s[1])*math.sqrt(3)/2 (t[1] - s[1])*math.sqrt(3) t[1] - s[1] t[1] t 1 s[1] s 1 math.sqrt(3) math.sqrt math sqrt 3 2 s[0] s 0 uy = (t[0] - s[0])*math.sqrt(3)/2 + (t[1] - s[1])/2 + s[1] uy (t[0] - s[0])*math.sqrt(3)/2 + (t[1] - s[1])/2 + s[1] (t[0] - s[0])*math.sqrt(3)/2 + (t[1] - s[1])/2 (t[0] - s[0])*math.sqrt(3)/2 (t[0] - s[0])*math.sqrt(3) t[0] - s[0] t[0] t 0 s[0] s 0 math.sqrt(3) math.sqrt math sqrt 3 2 (t[1] - s[1])/2 t[1] - s[1] t[1] t 1 s[1] s 1 2 s[1] s 1 u = (ux, uy) u (ux, uy) ux uy koch(n-1,p1, s) koch n-1 n 1 p1 s ppp(s) ppp s koch(n-1, s, u) koch n-1 n 1 s u ppp(u) ppp u koch(n-1, u, t) koch n-1 n 1 u t ppp(t) ppp t koch(n-1, t,p2) koch n-1 n 1 t p2 n n p1 p1 p2 p2 def ppp(t):
    print("{:.08f} {:.08f}".format(t[0],t[1])) ppp print("{:.08f} {:.08f}".format(t[0],t[1])) print "{:.08f} {:.08f}".format(t[0],t[1]) "{:.08f} {:.08f}".format "{:.08f} {:.08f}" format t[0] t 0 t[1] t 1 t t ppp(start) ppp start koch(n,start,end) koch n start end ppp(end) ppp end n = int(input()) int(input()) n end = (100,0) (100,0) end def koch(n,p1,p2):
    if n == 0:
        return

    s = ( (p1[0]*2 + p2[0])/3, (p1[1] *2 + p2[1])/3 )
    t = ( (p1[0] + p2[0]*2)/3, (p1[1] + p2[1] *2)/3 )

    ux = (t[0] - s[0])/2 - (t[1] - s[1])*math.sqrt(3)/2 + s[0]
    uy = (t[0] - s[0])*math.sqrt(3)/2 + (t[1] - s[1])/2 + s[1]
    u = (ux, uy)
    koch(n-1,p1, s)
    ppp(s)
    koch(n-1, s, u)
    ppp(u)
    koch(n-1, u, t)
    ppp(t)
    koch(n-1, t,p2) def koch(n,p1,p2):
    if n == 0:
        return

    s = ( (p1[0]*2 + p2[0])/3, (p1[1] *2 + p2[1])/3 )
    t = ( (p1[0] + p2[0]*2)/3, (p1[1] + p2[1] *2)/3 )

    ux = (t[0] - s[0])/2 - (t[1] - s[1])*math.sqrt(3)/2 + s[0]
    uy = (t[0] - s[0])*math.sqrt(3)/2 + (t[1] - s[1])/2 + s[1]
    u = (ux, uy)
    koch(n-1,p1, s)
    ppp(s)
    koch(n-1, s, u)
    ppp(u)
    koch(n-1, u, t)
    ppp(t)
    koch(n-1, t,p2) koch start = (0,0) (0,0) start def ppp(t):
    print("{:.08f} {:.08f}".format(t[0],t[1])) def ppp(t):
    print("{:.08f} {:.08f}".format(t[0],t[1])) ppp
import math
n = int(input())

start = (0,0)
end = (100,0)

def koch(n,p1,p2):
    if n == 0:
        return

    s = ( (p1[0]*2 + p2[0])/3, (p1[1] *2 + p2[1])/3 )
    t = ( (p1[0] + p2[0]*2)/3, (p1[1] + p2[1] *2)/3 )

    ux = (t[0] - s[0])/2 - (t[1] - s[1])*math.sqrt(3)/2 + s[0]
    uy = (t[0] - s[0])*math.sqrt(3)/2 + (t[1] - s[1])/2 + s[1]
    u = (ux, uy)
    koch(n-1,p1, s)
    ppp(s)
    koch(n-1, s, u)
    ppp(u)
    koch(n-1, u, t)
    ppp(t)
    koch(n-1, t,p2)

def ppp(t):
    print("{:.08f} {:.08f}".format(t[0],t[1]))

ppp(start)
koch(n,start,end)
ppp(end)

