# -*- coding: utf-8 -*-
from math import sin, cos, pi



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

    s = [None, None]
    u = [None, None]
    t = [None, None]
    
    s[0] = (2*p1[0] + p2[0])/3
    s[1] = (2*p1[1] + p2[1])/3
    t[0] = (p1[0] + 2*p2[0])/3
    t[1] = (p1[1] + 2*p2[1])/3
    u[0] = (t[0] - s[0])*cos(1/3*pi) - (t[1] - s[1])*sin(1/3*pi) + s[0]
    u[1] = (t[0] - s[0])*sin(1/3*pi) + (t[1] - s[1])*cos(1/3*pi) + s[1]

    koch(d-1, p1, 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, p2)

if __name__ == '__main__':

    n = int(input())
    a = [0, 0]
    b = [100, 0]

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

     from math import sin, cos, pi def koch(d, p1, p2):
    if d == 0:
        return

    s = [None, None]
    u = [None, None]
    t = [None, None]
    
    s[0] = (2*p1[0] + p2[0])/3
    s[1] = (2*p1[1] + p2[1])/3
    t[0] = (p1[0] + 2*p2[0])/3
    t[1] = (p1[1] + 2*p2[1])/3
    u[0] = (t[0] - s[0])*cos(1/3*pi) - (t[1] - s[1])*sin(1/3*pi) + s[0]
    u[1] = (t[0] - s[0])*sin(1/3*pi) + (t[1] - s[1])*cos(1/3*pi) + s[1]

    koch(d-1, p1, 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, p2) koch if d == 0:
        return

     d == 0 d 0 return s = [None, None] s [None, None] None None u = [None, None] u [None, None] None None t = [None, None] t [None, None] None None s[0] = (2*p1[0] + p2[0])/3 s[0] s 0 (2*p1[0] + p2[0])/3 2*p1[0] + p2[0] 2*p1[0] 2 p1[0] p1 0 p2[0] p2 0 3 s[1] = (2*p1[1] + p2[1])/3 s[1] s 1 (2*p1[1] + p2[1])/3 2*p1[1] + p2[1] 2*p1[1] 2 p1[1] p1 1 p2[1] p2 1 3 t[0] = (p1[0] + 2*p2[0])/3 t[0] t 0 (p1[0] + 2*p2[0])/3 p1[0] + 2*p2[0] p1[0] p1 0 2*p2[0] 2 p2[0] p2 0 3 t[1] = (p1[1] + 2*p2[1])/3 t[1] t 1 (p1[1] + 2*p2[1])/3 p1[1] + 2*p2[1] p1[1] p1 1 2*p2[1] 2 p2[1] p2 1 3 u[0] = (t[0] - s[0])*cos(1/3*pi) - (t[1] - s[1])*sin(1/3*pi) + s[0] u[0] u 0 (t[0] - s[0])*cos(1/3*pi) - (t[1] - s[1])*sin(1/3*pi) + s[0] (t[0] - s[0])*cos(1/3*pi) - (t[1] - s[1])*sin(1/3*pi) (t[0] - s[0])*cos(1/3*pi) t[0] - s[0] t[0] t 0 s[0] s 0 cos(1/3*pi) cos 1/3*pi 1/3 1 3 pi (t[1] - s[1])*sin(1/3*pi) t[1] - s[1] t[1] t 1 s[1] s 1 sin(1/3*pi) sin 1/3*pi 1/3 1 3 pi s[0] s 0 u[1] = (t[0] - s[0])*sin(1/3*pi) + (t[1] - s[1])*cos(1/3*pi) + s[1] u[1] u 1 (t[0] - s[0])*sin(1/3*pi) + (t[1] - s[1])*cos(1/3*pi) + s[1] (t[0] - s[0])*sin(1/3*pi) + (t[1] - s[1])*cos(1/3*pi) (t[0] - s[0])*sin(1/3*pi) t[0] - s[0] t[0] t 0 s[0] s 0 sin(1/3*pi) sin 1/3*pi 1/3 1 3 pi (t[1] - s[1])*cos(1/3*pi) t[1] - s[1] t[1] t 1 s[1] s 1 cos(1/3*pi) cos 1/3*pi 1/3 1 3 pi s[1] s 1 koch(d-1, p1, s) koch d-1 d 1 p1 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, p2) koch d-1 d 1 t p2 d d p1 p1 p2 p2 if __name__ == '__main__':

    n = int(input())
    a = [0, 0]
    b = [100, 0]

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

     __name__ == '__main__' __name__ '__main__' n = int(input()) n int(input()) int input() input 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 a = [0, 0] [0, 0] a b = [100, 0] [100, 0] b n = int(input()) int(input()) n def koch(d, p1, p2):
    if d == 0:
        return

    s = [None, None]
    u = [None, None]
    t = [None, None]
    
    s[0] = (2*p1[0] + p2[0])/3
    s[1] = (2*p1[1] + p2[1])/3
    t[0] = (p1[0] + 2*p2[0])/3
    t[1] = (p1[1] + 2*p2[1])/3
    u[0] = (t[0] - s[0])*cos(1/3*pi) - (t[1] - s[1])*sin(1/3*pi) + s[0]
    u[1] = (t[0] - s[0])*sin(1/3*pi) + (t[1] - s[1])*cos(1/3*pi) + s[1]

    koch(d-1, p1, 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, p2) def koch(d, p1, p2):
    if d == 0:
        return

    s = [None, None]
    u = [None, None]
    t = [None, None]
    
    s[0] = (2*p1[0] + p2[0])/3
    s[1] = (2*p1[1] + p2[1])/3
    t[0] = (p1[0] + 2*p2[0])/3
    t[1] = (p1[1] + 2*p2[1])/3
    u[0] = (t[0] - s[0])*cos(1/3*pi) - (t[1] - s[1])*sin(1/3*pi) + s[0]
    u[1] = (t[0] - s[0])*sin(1/3*pi) + (t[1] - s[1])*cos(1/3*pi) + s[1]

    koch(d-1, p1, 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, p2) koch
# -*- coding: utf-8 -*-
from math import sin, cos, pi



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

    s = [None, None]
    u = [None, None]
    t = [None, None]
    
    s[0] = (2*p1[0] + p2[0])/3
    s[1] = (2*p1[1] + p2[1])/3
    t[0] = (p1[0] + 2*p2[0])/3
    t[1] = (p1[1] + 2*p2[1])/3
    u[0] = (t[0] - s[0])*cos(1/3*pi) - (t[1] - s[1])*sin(1/3*pi) + s[0]
    u[1] = (t[0] - s[0])*sin(1/3*pi) + (t[1] - s[1])*cos(1/3*pi) + s[1]

    koch(d-1, p1, 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, p2)

if __name__ == '__main__':

    n = int(input())
    a = [0, 0]
    b = [100, 0]

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

    
