import math
n = int(input())
a = [0] * 2
b = [0] * 2
a[0] = 0
b[0] = 100

def koch(n, a, b):
    if n == 0:
        return
    
    s = [0] * 2
    t = [0] * 2
    u =[0] * 2
    
    s[0] = (2.0 * a[0] + 1.0 * b[0]) / 3.0
    s[1] = (2.0 * a[1] + 1.0 * b[1]) / 3.0
    t[0] = (1.0 * a[0] + 2.0 * b[0]) / 3.0
    t[1] = (1.0 * a[1] + 2.0 * b[1]) / 3.0
    u[0] = (t[0] - s[0]) * math.cos(math.pi/3) - (t[1] - s[1]) * math.sin(math.pi/3) + s[0]
    u[1] = (t[0] - s[0]) * math.sin(math.pi/3) + (t[1] - s[1]) * math.cos(math.pi/3) + s[1]
    
    koch(n - 1, a, s)
    print(s[0], s[1])
    koch(n - 1, s, u)
    print(u[0], u[1])
    koch(n - 1, u, t)
    print(t[0], t[1])
    koch(n - 1, t, b)

print(a[0], a[1])
koch(n, a, b)
print(b[0], b[1]) import math math n = int(input()) n int(input()) int input() input a = [0] * 2 a [0] * 2 [0] 0 2 b = [0] * 2 b [0] * 2 [0] 0 2 a[0] = 0 a[0] a 0 0 b[0] = 100 b[0] b 0 100 def koch(n, a, b):
    if n == 0:
        return
    
    s = [0] * 2
    t = [0] * 2
    u =[0] * 2
    
    s[0] = (2.0 * a[0] + 1.0 * b[0]) / 3.0
    s[1] = (2.0 * a[1] + 1.0 * b[1]) / 3.0
    t[0] = (1.0 * a[0] + 2.0 * b[0]) / 3.0
    t[1] = (1.0 * a[1] + 2.0 * b[1]) / 3.0
    u[0] = (t[0] - s[0]) * math.cos(math.pi/3) - (t[1] - s[1]) * math.sin(math.pi/3) + s[0]
    u[1] = (t[0] - s[0]) * math.sin(math.pi/3) + (t[1] - s[1]) * math.cos(math.pi/3) + s[1]
    
    koch(n - 1, a, s)
    print(s[0], s[1])
    koch(n - 1, s, u)
    print(u[0], u[1])
    koch(n - 1, u, t)
    print(t[0], t[1])
    koch(n - 1, t, b) koch if n == 0:
        return
    
     n == 0 n 0 return s = [0] * 2 s [0] * 2 [0] 0 2 t = [0] * 2 t [0] * 2 [0] 0 2 u =[0] * 2 u [0] * 2 [0] 0 2 s[0] = (2.0 * a[0] + 1.0 * b[0]) / 3.0 s[0] s 0 (2.0 * a[0] + 1.0 * b[0]) / 3.0 2.0 * a[0] + 1.0 * b[0] 2.0 * a[0] 2.0 a[0] a 0 1.0 * b[0] 1.0 b[0] b 0 3.0 s[1] = (2.0 * a[1] + 1.0 * b[1]) / 3.0 s[1] s 1 (2.0 * a[1] + 1.0 * b[1]) / 3.0 2.0 * a[1] + 1.0 * b[1] 2.0 * a[1] 2.0 a[1] a 1 1.0 * b[1] 1.0 b[1] b 1 3.0 t[0] = (1.0 * a[0] + 2.0 * b[0]) / 3.0 t[0] t 0 (1.0 * a[0] + 2.0 * b[0]) / 3.0 1.0 * a[0] + 2.0 * b[0] 1.0 * a[0] 1.0 a[0] a 0 2.0 * b[0] 2.0 b[0] b 0 3.0 t[1] = (1.0 * a[1] + 2.0 * b[1]) / 3.0 t[1] t 1 (1.0 * a[1] + 2.0 * b[1]) / 3.0 1.0 * a[1] + 2.0 * b[1] 1.0 * a[1] 1.0 a[1] a 1 2.0 * b[1] 2.0 b[1] b 1 3.0 u[0] = (t[0] - s[0]) * math.cos(math.pi/3) - (t[1] - s[1]) * math.sin(math.pi/3) + s[0] u[0] u 0 (t[0] - s[0]) * math.cos(math.pi/3) - (t[1] - s[1]) * math.sin(math.pi/3) + s[0] (t[0] - s[0]) * math.cos(math.pi/3) - (t[1] - s[1]) * math.sin(math.pi/3) (t[0] - s[0]) * math.cos(math.pi/3) t[0] - s[0] t[0] t 0 s[0] s 0 math.cos(math.pi/3) math.cos math cos math.pi/3 math.pi math pi 3 (t[1] - s[1]) * math.sin(math.pi/3) t[1] - s[1] t[1] t 1 s[1] s 1 math.sin(math.pi/3) math.sin math sin math.pi/3 math.pi math pi 3 s[0] s 0 u[1] = (t[0] - s[0]) * math.sin(math.pi/3) + (t[1] - s[1]) * math.cos(math.pi/3) + s[1] u[1] u 1 (t[0] - s[0]) * math.sin(math.pi/3) + (t[1] - s[1]) * math.cos(math.pi/3) + s[1] (t[0] - s[0]) * math.sin(math.pi/3) + (t[1] - s[1]) * math.cos(math.pi/3) (t[0] - s[0]) * math.sin(math.pi/3) t[0] - s[0] t[0] t 0 s[0] s 0 math.sin(math.pi/3) math.sin math sin math.pi/3 math.pi math pi 3 (t[1] - s[1]) * math.cos(math.pi/3) t[1] - s[1] t[1] t 1 s[1] s 1 math.cos(math.pi/3) math.cos math cos math.pi/3 math.pi math pi 3 s[1] s 1 koch(n - 1, a, s) koch n - 1 n 1 a s print(s[0], s[1]) print s[0] s 0 s[1] s 1 koch(n - 1, s, u) koch n - 1 n 1 s u print(u[0], u[1]) print u[0] u 0 u[1] u 1 koch(n - 1, u, t) koch n - 1 n 1 u t print(t[0], t[1]) print t[0] t 0 t[1] t 1 koch(n - 1, t, b) koch n - 1 n 1 t b n n a a b b 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 n = int(input()) int(input()) n b = [0] * 2 [0] * 2 b def koch(n, a, b):
    if n == 0:
        return
    
    s = [0] * 2
    t = [0] * 2
    u =[0] * 2
    
    s[0] = (2.0 * a[0] + 1.0 * b[0]) / 3.0
    s[1] = (2.0 * a[1] + 1.0 * b[1]) / 3.0
    t[0] = (1.0 * a[0] + 2.0 * b[0]) / 3.0
    t[1] = (1.0 * a[1] + 2.0 * b[1]) / 3.0
    u[0] = (t[0] - s[0]) * math.cos(math.pi/3) - (t[1] - s[1]) * math.sin(math.pi/3) + s[0]
    u[1] = (t[0] - s[0]) * math.sin(math.pi/3) + (t[1] - s[1]) * math.cos(math.pi/3) + s[1]
    
    koch(n - 1, a, s)
    print(s[0], s[1])
    koch(n - 1, s, u)
    print(u[0], u[1])
    koch(n - 1, u, t)
    print(t[0], t[1])
    koch(n - 1, t, b) def koch(n, a, b):
    if n == 0:
        return
    
    s = [0] * 2
    t = [0] * 2
    u =[0] * 2
    
    s[0] = (2.0 * a[0] + 1.0 * b[0]) / 3.0
    s[1] = (2.0 * a[1] + 1.0 * b[1]) / 3.0
    t[0] = (1.0 * a[0] + 2.0 * b[0]) / 3.0
    t[1] = (1.0 * a[1] + 2.0 * b[1]) / 3.0
    u[0] = (t[0] - s[0]) * math.cos(math.pi/3) - (t[1] - s[1]) * math.sin(math.pi/3) + s[0]
    u[1] = (t[0] - s[0]) * math.sin(math.pi/3) + (t[1] - s[1]) * math.cos(math.pi/3) + s[1]
    
    koch(n - 1, a, s)
    print(s[0], s[1])
    koch(n - 1, s, u)
    print(u[0], u[1])
    koch(n - 1, u, t)
    print(t[0], t[1])
    koch(n - 1, t, b) koch a = [0] * 2 [0] * 2 a
import math
n = int(input())
a = [0] * 2
b = [0] * 2
a[0] = 0
b[0] = 100

def koch(n, a, b):
    if n == 0:
        return
    
    s = [0] * 2
    t = [0] * 2
    u =[0] * 2
    
    s[0] = (2.0 * a[0] + 1.0 * b[0]) / 3.0
    s[1] = (2.0 * a[1] + 1.0 * b[1]) / 3.0
    t[0] = (1.0 * a[0] + 2.0 * b[0]) / 3.0
    t[1] = (1.0 * a[1] + 2.0 * b[1]) / 3.0
    u[0] = (t[0] - s[0]) * math.cos(math.pi/3) - (t[1] - s[1]) * math.sin(math.pi/3) + s[0]
    u[1] = (t[0] - s[0]) * math.sin(math.pi/3) + (t[1] - s[1]) * math.cos(math.pi/3) + s[1]
    
    koch(n - 1, a, s)
    print(s[0], s[1])
    koch(n - 1, s, u)
    print(u[0], u[1])
    koch(n - 1, u, t)
    print(t[0], t[1])
    koch(n - 1, t, b)

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