import sys
input = sys.stdin.readline

import math
cos60 = math.cos(math.radians(60))
sin60 = math.sin(math.radians(60))

n =  int(input())

def koch(d, p, q):#p,qはリストでp[0]がx座標、p[1]がy座標
    if d == 0:
        return
    s=[0,0]
    t=[0,0]
    u=[0,0]
    s[0] = (2 * p[0] + q[0]) / 3
    s[1] = (2 * p[1] + q[1]) / 3
    t[0] = (p[0] + 2 * q[0]) / 3
    t[1] = (p[1] + 2 * q[1]) / 3
    u[0] = (t[0] - s[0]) * cos60 - (t[1] - s[1]) * sin60 + s[0]
    u[1] = (t[0] - s[0]) * sin60 + (t[1] - s[1]) * cos60 + s[1]
    
    koch(d-1, p, s)
    print(s[0], s[1])
    koch(d-1, s, u)
    print(u[0], u[1])
    koch(d-1, u, t)
    print(t[0], t[1])
    koch(d-1, t, q)

a = [0, 0]
b = [100, 0]

print(a[0], a[1])
koch(n, a, b)
print(b[0], b[1]) import sys sys input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline import math math cos60 = math.cos(math.radians(60)) cos60 math.cos(math.radians(60)) math.cos math cos math.radians(60) math.radians math radians 60 sin60 = math.sin(math.radians(60)) sin60 math.sin(math.radians(60)) math.sin math sin math.radians(60) math.radians math radians 60 n =  int(input()) n int(input()) int input() input def koch(d, p, q):#p,qはリストでp[0]がx座標、p[1]がy座標
    if d == 0:
        return
    s=[0,0]
    t=[0,0]
    u=[0,0]
    s[0] = (2 * p[0] + q[0]) / 3
    s[1] = (2 * p[1] + q[1]) / 3
    t[0] = (p[0] + 2 * q[0]) / 3
    t[1] = (p[1] + 2 * q[1]) / 3
    u[0] = (t[0] - s[0]) * cos60 - (t[1] - s[1]) * sin60 + s[0]
    u[1] = (t[0] - s[0]) * sin60 + (t[1] - s[1]) * cos60 + s[1]
    
    koch(d-1, p, s)
    print(s[0], s[1])
    koch(d-1, s, u)
    print(u[0], u[1])
    koch(d-1, u, t)
    print(t[0], t[1])
    koch(d-1, t, q) koch if d == 0:
        return
     d == 0 d 0 return s=[0,0] s [0,0] 0 0 t=[0,0] t [0,0] 0 0 u=[0,0] u [0,0] 0 0 s[0] = (2 * p[0] + q[0]) / 3 s[0] s 0 (2 * p[0] + q[0]) / 3 2 * p[0] + q[0] 2 * p[0] 2 p[0] p 0 q[0] q 0 3 s[1] = (2 * p[1] + q[1]) / 3 s[1] s 1 (2 * p[1] + q[1]) / 3 2 * p[1] + q[1] 2 * p[1] 2 p[1] p 1 q[1] q 1 3 t[0] = (p[0] + 2 * q[0]) / 3 t[0] t 0 (p[0] + 2 * q[0]) / 3 p[0] + 2 * q[0] p[0] p 0 2 * q[0] 2 q[0] q 0 3 t[1] = (p[1] + 2 * q[1]) / 3 t[1] t 1 (p[1] + 2 * q[1]) / 3 p[1] + 2 * q[1] p[1] p 1 2 * q[1] 2 q[1] q 1 3 u[0] = (t[0] - s[0]) * cos60 - (t[1] - s[1]) * sin60 + s[0] u[0] u 0 (t[0] - s[0]) * cos60 - (t[1] - s[1]) * sin60 + s[0] (t[0] - s[0]) * cos60 - (t[1] - s[1]) * sin60 (t[0] - s[0]) * cos60 t[0] - s[0] t[0] t 0 s[0] s 0 cos60 (t[1] - s[1]) * sin60 t[1] - s[1] t[1] t 1 s[1] s 1 sin60 s[0] s 0 u[1] = (t[0] - s[0]) * sin60 + (t[1] - s[1]) * cos60 + s[1] u[1] u 1 (t[0] - s[0]) * sin60 + (t[1] - s[1]) * cos60 + s[1] (t[0] - s[0]) * sin60 + (t[1] - s[1]) * cos60 (t[0] - s[0]) * sin60 t[0] - s[0] t[0] t 0 s[0] s 0 sin60 (t[1] - s[1]) * cos60 t[1] - s[1] t[1] t 1 s[1] s 1 cos60 s[1] s 1 koch(d-1, p, s) koch d-1 d 1 p s print(s[0], s[1]) print s[0] s 0 s[1] s 1 koch(d-1, s, u) koch d-1 d 1 s u print(u[0], u[1]) print u[0] u 0 u[1] u 1 koch(d-1, u, t) koch d-1 d 1 u t print(t[0], t[1]) print t[0] t 0 t[1] t 1 koch(d-1, t, q) koch d-1 d 1 t q d d p p q q a = [0, 0] a [0, 0] 0 0 b = [100, 0] b [100, 0] 100 0 print(a[0], a[1]) print a[0] a 0 a[1] a 1 koch(n, a, b) koch n a b print(b[0], b[1]) print b[0] b 0 b[1] b 1 sin60 = math.sin(math.radians(60)) math.sin(math.radians(60)) sin60 n =  int(input()) int(input()) n input = sys.stdin.readline sys.stdin.readline input def koch(d, p, q):#p,qはリストでp[0]がx座標、p[1]がy座標
    if d == 0:
        return
    s=[0,0]
    t=[0,0]
    u=[0,0]
    s[0] = (2 * p[0] + q[0]) / 3
    s[1] = (2 * p[1] + q[1]) / 3
    t[0] = (p[0] + 2 * q[0]) / 3
    t[1] = (p[1] + 2 * q[1]) / 3
    u[0] = (t[0] - s[0]) * cos60 - (t[1] - s[1]) * sin60 + s[0]
    u[1] = (t[0] - s[0]) * sin60 + (t[1] - s[1]) * cos60 + s[1]
    
    koch(d-1, p, s)
    print(s[0], s[1])
    koch(d-1, s, u)
    print(u[0], u[1])
    koch(d-1, u, t)
    print(t[0], t[1])
    koch(d-1, t, q) def koch(d, p, q):#p,qはリストでp[0]がx座標、p[1]がy座標
    if d == 0:
        return
    s=[0,0]
    t=[0,0]
    u=[0,0]
    s[0] = (2 * p[0] + q[0]) / 3
    s[1] = (2 * p[1] + q[1]) / 3
    t[0] = (p[0] + 2 * q[0]) / 3
    t[1] = (p[1] + 2 * q[1]) / 3
    u[0] = (t[0] - s[0]) * cos60 - (t[1] - s[1]) * sin60 + s[0]
    u[1] = (t[0] - s[0]) * sin60 + (t[1] - s[1]) * cos60 + s[1]
    
    koch(d-1, p, s)
    print(s[0], s[1])
    koch(d-1, s, u)
    print(u[0], u[1])
    koch(d-1, u, t)
    print(t[0], t[1])
    koch(d-1, t, q) koch b = [100, 0] [100, 0] b cos60 = math.cos(math.radians(60)) math.cos(math.radians(60)) cos60 a = [0, 0] [0, 0] a
import sys
input = sys.stdin.readline

import math
cos60 = math.cos(math.radians(60))
sin60 = math.sin(math.radians(60))

n =  int(input())

def koch(d, p, q):#p,qはリストでp[0]がx座標、p[1]がy座標
    if d == 0:
        return
    s=[0,0]
    t=[0,0]
    u=[0,0]
    s[0] = (2 * p[0] + q[0]) / 3
    s[1] = (2 * p[1] + q[1]) / 3
    t[0] = (p[0] + 2 * q[0]) / 3
    t[1] = (p[1] + 2 * q[1]) / 3
    u[0] = (t[0] - s[0]) * cos60 - (t[1] - s[1]) * sin60 + s[0]
    u[1] = (t[0] - s[0]) * sin60 + (t[1] - s[1]) * cos60 + s[1]
    
    koch(d-1, p, s)
    print(s[0], s[1])
    koch(d-1, s, u)
    print(u[0], u[1])
    koch(d-1, u, t)
    print(t[0], t[1])
    koch(d-1, t, q)

a = [0, 0]
b = [100, 0]

print(a[0], a[1])
koch(n, a, b)
print(b[0], b[1])
