from math import cos,sin,radians

n=int(input())

def koch(n):
    if n==0:
        return [[0,0],[100,0]]
    points=koch(n-1)
    new_points=[]
    for i in range(len(points)-1):
        a_x=points[i][0]
        a_y=points[i][1]
        b_x=points[i+1][0]
        b_y=points[i+1][1]
        c_x,c_y=a_x*2/3+b_x/3,a_y*2/3+b_y/3
        d_x,d_y=a_x/3+b_x*2/3,a_y/3+b_y*2/3
        e_x=(d_x-c_x)*cos(radians(60))-(d_y-c_y)*sin(radians(60))+c_x
        e_y=(d_x-c_x)*sin(radians(60))+(d_y-c_y)*cos(radians(60))+c_y
        if [a_x,a_y] not in new_points:
            new_points.append([a_x,a_y])
        new_points.append([c_x,c_y])
        new_points.append([e_x,e_y])
        new_points.append([d_x,d_y])
        if [b_x,b_y] not in new_points:
            new_points.append([b_x,b_y])
    return new_points

for i in koch(n):
    print(*i) from math import cos,sin,radians n=int(input()) n int(input()) int input() input def koch(n):
    if n==0:
        return [[0,0],[100,0]]
    points=koch(n-1)
    new_points=[]
    for i in range(len(points)-1):
        a_x=points[i][0]
        a_y=points[i][1]
        b_x=points[i+1][0]
        b_y=points[i+1][1]
        c_x,c_y=a_x*2/3+b_x/3,a_y*2/3+b_y/3
        d_x,d_y=a_x/3+b_x*2/3,a_y/3+b_y*2/3
        e_x=(d_x-c_x)*cos(radians(60))-(d_y-c_y)*sin(radians(60))+c_x
        e_y=(d_x-c_x)*sin(radians(60))+(d_y-c_y)*cos(radians(60))+c_y
        if [a_x,a_y] not in new_points:
            new_points.append([a_x,a_y])
        new_points.append([c_x,c_y])
        new_points.append([e_x,e_y])
        new_points.append([d_x,d_y])
        if [b_x,b_y] not in new_points:
            new_points.append([b_x,b_y])
    return new_points koch if n==0:
        return [[0,0],[100,0]]
     n==0 n 0 return [[0,0],[100,0]] [[0,0],[100,0]] [0,0] 0 0 [100,0] 100 0 points=koch(n-1) points koch(n-1) koch n-1 n 1 new_points=[] new_points [] for i in range(len(points)-1):
        a_x=points[i][0]
        a_y=points[i][1]
        b_x=points[i+1][0]
        b_y=points[i+1][1]
        c_x,c_y=a_x*2/3+b_x/3,a_y*2/3+b_y/3
        d_x,d_y=a_x/3+b_x*2/3,a_y/3+b_y*2/3
        e_x=(d_x-c_x)*cos(radians(60))-(d_y-c_y)*sin(radians(60))+c_x
        e_y=(d_x-c_x)*sin(radians(60))+(d_y-c_y)*cos(radians(60))+c_y
        if [a_x,a_y] not in new_points:
            new_points.append([a_x,a_y])
        new_points.append([c_x,c_y])
        new_points.append([e_x,e_y])
        new_points.append([d_x,d_y])
        if [b_x,b_y] not in new_points:
            new_points.append([b_x,b_y])
     i range(len(points)-1) range len(points)-1 len(points) len points 1 a_x=points[i][0] a_x points[i][0] [i] points i 0 a_y=points[i][1] a_y points[i][1] [i] points i 1 b_x=points[i+1][0] b_x points[i+1][0] [i+1] points i+1 i 1 0 b_y=points[i+1][1] b_y points[i+1][1] [i+1] points i+1 i 1 1 c_x,c_y=a_x*2/3+b_x/3,a_y*2/3+b_y/3 c_x a_x*2/3+b_x/3 a_x*2/3 a_x*2 a_x 2 3 b_x/3 b_x 3 c_y a_y*2/3+b_y/3 a_y*2/3 a_y*2 a_y 2 3 b_y/3 b_y 3 d_x,d_y=a_x/3+b_x*2/3,a_y/3+b_y*2/3 d_x a_x/3+b_x*2/3 a_x/3 a_x 3 b_x*2/3 b_x*2 b_x 2 3 d_y a_y/3+b_y*2/3 a_y/3 a_y 3 b_y*2/3 b_y*2 b_y 2 3 e_x=(d_x-c_x)*cos(radians(60))-(d_y-c_y)*sin(radians(60))+c_x e_x (d_x-c_x)*cos(radians(60))-(d_y-c_y)*sin(radians(60))+c_x (d_x-c_x)*cos(radians(60))-(d_y-c_y)*sin(radians(60)) (d_x-c_x)*cos(radians(60)) d_x-c_x d_x c_x cos(radians(60)) cos radians(60) radians 60 (d_y-c_y)*sin(radians(60)) d_y-c_y d_y c_y sin(radians(60)) sin radians(60) radians 60 c_x e_y=(d_x-c_x)*sin(radians(60))+(d_y-c_y)*cos(radians(60))+c_y e_y (d_x-c_x)*sin(radians(60))+(d_y-c_y)*cos(radians(60))+c_y (d_x-c_x)*sin(radians(60))+(d_y-c_y)*cos(radians(60)) (d_x-c_x)*sin(radians(60)) d_x-c_x d_x c_x sin(radians(60)) sin radians(60) radians 60 (d_y-c_y)*cos(radians(60)) d_y-c_y d_y c_y cos(radians(60)) cos radians(60) radians 60 c_y if [a_x,a_y] not in new_points:
            new_points.append([a_x,a_y])
         [a_x,a_y] not in new_points [a_x,a_y] a_x a_y new_points new_points.append([a_x,a_y]) new_points.append new_points append [a_x,a_y] a_x a_y new_points.append([c_x,c_y]) new_points.append new_points append [c_x,c_y] c_x c_y new_points.append([e_x,e_y]) new_points.append new_points append [e_x,e_y] e_x e_y new_points.append([d_x,d_y]) new_points.append new_points append [d_x,d_y] d_x d_y if [b_x,b_y] not in new_points:
            new_points.append([b_x,b_y])
     [b_x,b_y] not in new_points [b_x,b_y] b_x b_y new_points new_points.append([b_x,b_y]) new_points.append new_points append [b_x,b_y] b_x b_y return new_points new_points n n for i in koch(n):
    print(*i) i koch(n) koch n print(*i) print *i i def koch(n):
    if n==0:
        return [[0,0],[100,0]]
    points=koch(n-1)
    new_points=[]
    for i in range(len(points)-1):
        a_x=points[i][0]
        a_y=points[i][1]
        b_x=points[i+1][0]
        b_y=points[i+1][1]
        c_x,c_y=a_x*2/3+b_x/3,a_y*2/3+b_y/3
        d_x,d_y=a_x/3+b_x*2/3,a_y/3+b_y*2/3
        e_x=(d_x-c_x)*cos(radians(60))-(d_y-c_y)*sin(radians(60))+c_x
        e_y=(d_x-c_x)*sin(radians(60))+(d_y-c_y)*cos(radians(60))+c_y
        if [a_x,a_y] not in new_points:
            new_points.append([a_x,a_y])
        new_points.append([c_x,c_y])
        new_points.append([e_x,e_y])
        new_points.append([d_x,d_y])
        if [b_x,b_y] not in new_points:
            new_points.append([b_x,b_y])
    return new_points def koch(n):
    if n==0:
        return [[0,0],[100,0]]
    points=koch(n-1)
    new_points=[]
    for i in range(len(points)-1):
        a_x=points[i][0]
        a_y=points[i][1]
        b_x=points[i+1][0]
        b_y=points[i+1][1]
        c_x,c_y=a_x*2/3+b_x/3,a_y*2/3+b_y/3
        d_x,d_y=a_x/3+b_x*2/3,a_y/3+b_y*2/3
        e_x=(d_x-c_x)*cos(radians(60))-(d_y-c_y)*sin(radians(60))+c_x
        e_y=(d_x-c_x)*sin(radians(60))+(d_y-c_y)*cos(radians(60))+c_y
        if [a_x,a_y] not in new_points:
            new_points.append([a_x,a_y])
        new_points.append([c_x,c_y])
        new_points.append([e_x,e_y])
        new_points.append([d_x,d_y])
        if [b_x,b_y] not in new_points:
            new_points.append([b_x,b_y])
    return new_points koch n=int(input()) int(input()) n
from math import cos,sin,radians

n=int(input())

def koch(n):
    if n==0:
        return [[0,0],[100,0]]
    points=koch(n-1)
    new_points=[]
    for i in range(len(points)-1):
        a_x=points[i][0]
        a_y=points[i][1]
        b_x=points[i+1][0]
        b_y=points[i+1][1]
        c_x,c_y=a_x*2/3+b_x/3,a_y*2/3+b_y/3
        d_x,d_y=a_x/3+b_x*2/3,a_y/3+b_y*2/3
        e_x=(d_x-c_x)*cos(radians(60))-(d_y-c_y)*sin(radians(60))+c_x
        e_y=(d_x-c_x)*sin(radians(60))+(d_y-c_y)*cos(radians(60))+c_y
        if [a_x,a_y] not in new_points:
            new_points.append([a_x,a_y])
        new_points.append([c_x,c_y])
        new_points.append([e_x,e_y])
        new_points.append([d_x,d_y])
        if [b_x,b_y] not in new_points:
            new_points.append([b_x,b_y])
    return new_points

for i in koch(n):
    print(*i)
