import math

n = int(input())

dots = [[0,0],[100,0]]
for _ in range(n):
    producedDots = []
    for i in range(len(dots)-1):
        pointA = [dots[i][0] + (dots[i+1][0]-dots[i][0])/3, dots[i][1] + (dots[i+1][1]-dots[i][1])/3]
        pointB = [dots[i][0] + (dots[i+1][0]-dots[i][0])*2/3, dots[i][1] + (dots[i+1][1]-dots[i][1])*2/3]

        producedDots.append(dots[i])
        producedDots.append(pointA)

        arrow = [pointB[0]-pointA[0], pointB[1]-pointA[1]]
        cos60 = math.cos(math.radians(60))
        sin60 = math.sin(math.radians(60))
        newArrow = [arrow[0]*cos60 - arrow[1]*sin60, arrow[0]*sin60 + arrow[1]*cos60]
        pointC = [pointA[0] + newArrow[0], pointA[1] + newArrow[1]]
        producedDots.append(pointC)

        producedDots.append(pointB)
    dots = producedDots
    dots.append([100,0])

for _ in dots:
    print(" ".join(map(str,_))) import math math n = int(input()) n int(input()) int input() input dots = [[0,0],[100,0]] dots [[0,0],[100,0]] [0,0] 0 0 [100,0] 100 0 for _ in range(n):
    producedDots = []
    for i in range(len(dots)-1):
        pointA = [dots[i][0] + (dots[i+1][0]-dots[i][0])/3, dots[i][1] + (dots[i+1][1]-dots[i][1])/3]
        pointB = [dots[i][0] + (dots[i+1][0]-dots[i][0])*2/3, dots[i][1] + (dots[i+1][1]-dots[i][1])*2/3]

        producedDots.append(dots[i])
        producedDots.append(pointA)

        arrow = [pointB[0]-pointA[0], pointB[1]-pointA[1]]
        cos60 = math.cos(math.radians(60))
        sin60 = math.sin(math.radians(60))
        newArrow = [arrow[0]*cos60 - arrow[1]*sin60, arrow[0]*sin60 + arrow[1]*cos60]
        pointC = [pointA[0] + newArrow[0], pointA[1] + newArrow[1]]
        producedDots.append(pointC)

        producedDots.append(pointB)
    dots = producedDots
    dots.append([100,0]) _ range(n) range n producedDots = [] producedDots [] for i in range(len(dots)-1):
        pointA = [dots[i][0] + (dots[i+1][0]-dots[i][0])/3, dots[i][1] + (dots[i+1][1]-dots[i][1])/3]
        pointB = [dots[i][0] + (dots[i+1][0]-dots[i][0])*2/3, dots[i][1] + (dots[i+1][1]-dots[i][1])*2/3]

        producedDots.append(dots[i])
        producedDots.append(pointA)

        arrow = [pointB[0]-pointA[0], pointB[1]-pointA[1]]
        cos60 = math.cos(math.radians(60))
        sin60 = math.sin(math.radians(60))
        newArrow = [arrow[0]*cos60 - arrow[1]*sin60, arrow[0]*sin60 + arrow[1]*cos60]
        pointC = [pointA[0] + newArrow[0], pointA[1] + newArrow[1]]
        producedDots.append(pointC)

        producedDots.append(pointB)
     i range(len(dots)-1) range len(dots)-1 len(dots) len dots 1 pointA = [dots[i][0] + (dots[i+1][0]-dots[i][0])/3, dots[i][1] + (dots[i+1][1]-dots[i][1])/3] pointA [dots[i][0] + (dots[i+1][0]-dots[i][0])/3, dots[i][1] + (dots[i+1][1]-dots[i][1])/3] dots[i][0] + (dots[i+1][0]-dots[i][0])/3 dots[i][0] [i] dots i 0 (dots[i+1][0]-dots[i][0])/3 dots[i+1][0]-dots[i][0] dots[i+1][0] [i+1] dots i+1 i 1 0 dots[i][0] [i] dots i 0 3 dots[i][1] + (dots[i+1][1]-dots[i][1])/3 dots[i][1] [i] dots i 1 (dots[i+1][1]-dots[i][1])/3 dots[i+1][1]-dots[i][1] dots[i+1][1] [i+1] dots i+1 i 1 1 dots[i][1] [i] dots i 1 3 pointB = [dots[i][0] + (dots[i+1][0]-dots[i][0])*2/3, dots[i][1] + (dots[i+1][1]-dots[i][1])*2/3] pointB [dots[i][0] + (dots[i+1][0]-dots[i][0])*2/3, dots[i][1] + (dots[i+1][1]-dots[i][1])*2/3] dots[i][0] + (dots[i+1][0]-dots[i][0])*2/3 dots[i][0] [i] dots i 0 (dots[i+1][0]-dots[i][0])*2/3 (dots[i+1][0]-dots[i][0])*2 dots[i+1][0]-dots[i][0] dots[i+1][0] [i+1] dots i+1 i 1 0 dots[i][0] [i] dots i 0 2 3 dots[i][1] + (dots[i+1][1]-dots[i][1])*2/3 dots[i][1] [i] dots i 1 (dots[i+1][1]-dots[i][1])*2/3 (dots[i+1][1]-dots[i][1])*2 dots[i+1][1]-dots[i][1] dots[i+1][1] [i+1] dots i+1 i 1 1 dots[i][1] [i] dots i 1 2 3 producedDots.append(dots[i]) producedDots.append producedDots append dots[i] dots i producedDots.append(pointA) producedDots.append producedDots append pointA arrow = [pointB[0]-pointA[0], pointB[1]-pointA[1]] arrow [pointB[0]-pointA[0], pointB[1]-pointA[1]] pointB[0]-pointA[0] pointB[0] pointB 0 pointA[0] pointA 0 pointB[1]-pointA[1] pointB[1] pointB 1 pointA[1] pointA 1 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 newArrow = [arrow[0]*cos60 - arrow[1]*sin60, arrow[0]*sin60 + arrow[1]*cos60] newArrow [arrow[0]*cos60 - arrow[1]*sin60, arrow[0]*sin60 + arrow[1]*cos60] arrow[0]*cos60 - arrow[1]*sin60 arrow[0]*cos60 arrow[0] arrow 0 cos60 arrow[1]*sin60 arrow[1] arrow 1 sin60 arrow[0]*sin60 + arrow[1]*cos60 arrow[0]*sin60 arrow[0] arrow 0 sin60 arrow[1]*cos60 arrow[1] arrow 1 cos60 pointC = [pointA[0] + newArrow[0], pointA[1] + newArrow[1]] pointC [pointA[0] + newArrow[0], pointA[1] + newArrow[1]] pointA[0] + newArrow[0] pointA[0] pointA 0 newArrow[0] newArrow 0 pointA[1] + newArrow[1] pointA[1] pointA 1 newArrow[1] newArrow 1 producedDots.append(pointC) producedDots.append producedDots append pointC producedDots.append(pointB) producedDots.append producedDots append pointB dots = producedDots dots producedDots dots.append([100,0]) dots.append dots append [100,0] 100 0 for _ in dots:
    print(" ".join(map(str,_))) _ dots print(" ".join(map(str,_))) print " ".join(map(str,_)) " ".join " " join map(str,_) map str _ dots = producedDots producedDots dots n = int(input()) int(input()) n arrow = [pointB[0]-pointA[0], pointB[1]-pointA[1]] [pointB[0]-pointA[0], pointB[1]-pointA[1]] arrow newArrow = [arrow[0]*cos60 - arrow[1]*sin60, arrow[0]*sin60 + arrow[1]*cos60] [arrow[0]*cos60 - arrow[1]*sin60, arrow[0]*sin60 + arrow[1]*cos60] newArrow sin60 = math.sin(math.radians(60)) math.sin(math.radians(60)) sin60 pointA = [dots[i][0] + (dots[i+1][0]-dots[i][0])/3, dots[i][1] + (dots[i+1][1]-dots[i][1])/3] [dots[i][0] + (dots[i+1][0]-dots[i][0])/3, dots[i][1] + (dots[i+1][1]-dots[i][1])/3] pointA cos60 = math.cos(math.radians(60)) math.cos(math.radians(60)) cos60 producedDots = [] [] producedDots pointB = [dots[i][0] + (dots[i+1][0]-dots[i][0])*2/3, dots[i][1] + (dots[i+1][1]-dots[i][1])*2/3] [dots[i][0] + (dots[i+1][0]-dots[i][0])*2/3, dots[i][1] + (dots[i+1][1]-dots[i][1])*2/3] pointB pointC = [pointA[0] + newArrow[0], pointA[1] + newArrow[1]] [pointA[0] + newArrow[0], pointA[1] + newArrow[1]] pointC dots = [[0,0],[100,0]] [[0,0],[100,0]] dots
import math

n = int(input())

dots = [[0,0],[100,0]]
for _ in range(n):
    producedDots = []
    for i in range(len(dots)-1):
        pointA = [dots[i][0] + (dots[i+1][0]-dots[i][0])/3, dots[i][1] + (dots[i+1][1]-dots[i][1])/3]
        pointB = [dots[i][0] + (dots[i+1][0]-dots[i][0])*2/3, dots[i][1] + (dots[i+1][1]-dots[i][1])*2/3]

        producedDots.append(dots[i])
        producedDots.append(pointA)

        arrow = [pointB[0]-pointA[0], pointB[1]-pointA[1]]
        cos60 = math.cos(math.radians(60))
        sin60 = math.sin(math.radians(60))
        newArrow = [arrow[0]*cos60 - arrow[1]*sin60, arrow[0]*sin60 + arrow[1]*cos60]
        pointC = [pointA[0] + newArrow[0], pointA[1] + newArrow[1]]
        producedDots.append(pointC)

        producedDots.append(pointB)
    dots = producedDots
    dots.append([100,0])

for _ in dots:
    print(" ".join(map(str,_)))
