import math
def kochCurve(A):
    B = []
    for i in xrange(len(A)-1):
        p1 = A[i]
        p2 = A[i+1]
        s = ((A[i][0] * 2.0 + A[i+1][0] * 1.0)/3, (A[i][1] * 2.0 + A[i+1][1] * 1.0)/3)
        t = ((A[i][0] * 1.0 + A[i+1][0] * 2.0)/3, (A[i][1] * 1.0 + A[i+1][1] * 2.0)/3)
        x = t[0] - s[0]
        y = t[1] - s[1]
        rad = math.radians(60)
        ux = x * math.cos(rad) - y * math.sin(rad)
        uy = x * math.sin(rad) + y * math.cos(rad)
        u = (ux + s[0], uy + s[1])
        B.extend([p1, s, u, t])
    B.append(A[len(A)-1])
    return B

n = int(raw_input())
A = [(0, 0), (100, 0)]
for i in xrange(n):
    A = kochCurve(A)
for x in A:
    print x[0], x[1] import math math def kochCurve(A):
    B = []
    for i in xrange(len(A)-1):
        p1 = A[i]
        p2 = A[i+1]
        s = ((A[i][0] * 2.0 + A[i+1][0] * 1.0)/3, (A[i][1] * 2.0 + A[i+1][1] * 1.0)/3)
        t = ((A[i][0] * 1.0 + A[i+1][0] * 2.0)/3, (A[i][1] * 1.0 + A[i+1][1] * 2.0)/3)
        x = t[0] - s[0]
        y = t[1] - s[1]
        rad = math.radians(60)
        ux = x * math.cos(rad) - y * math.sin(rad)
        uy = x * math.sin(rad) + y * math.cos(rad)
        u = (ux + s[0], uy + s[1])
        B.extend([p1, s, u, t])
    B.append(A[len(A)-1])
    return B kochCurve B = [] B [] for i in xrange(len(A)-1):
        p1 = A[i]
        p2 = A[i+1]
        s = ((A[i][0] * 2.0 + A[i+1][0] * 1.0)/3, (A[i][1] * 2.0 + A[i+1][1] * 1.0)/3)
        t = ((A[i][0] * 1.0 + A[i+1][0] * 2.0)/3, (A[i][1] * 1.0 + A[i+1][1] * 2.0)/3)
        x = t[0] - s[0]
        y = t[1] - s[1]
        rad = math.radians(60)
        ux = x * math.cos(rad) - y * math.sin(rad)
        uy = x * math.sin(rad) + y * math.cos(rad)
        u = (ux + s[0], uy + s[1])
        B.extend([p1, s, u, t])
     i xrange(len(A)-1) xrange len(A)-1 len(A) len A 1 p1 = A[i] p1 A[i] A i p2 = A[i+1] p2 A[i+1] A i+1 i 1 s = ((A[i][0] * 2.0 + A[i+1][0] * 1.0)/3, (A[i][1] * 2.0 + A[i+1][1] * 1.0)/3) s ((A[i][0] * 2.0 + A[i+1][0] * 1.0)/3, (A[i][1] * 2.0 + A[i+1][1] * 1.0)/3) (A[i][0] * 2.0 + A[i+1][0] * 1.0)/3 A[i][0] * 2.0 + A[i+1][0] * 1.0 A[i][0] * 2.0 A[i][0] [i] A i 0 2.0 A[i+1][0] * 1.0 A[i+1][0] [i+1] A i+1 i 1 0 1.0 3 (A[i][1] * 2.0 + A[i+1][1] * 1.0)/3 A[i][1] * 2.0 + A[i+1][1] * 1.0 A[i][1] * 2.0 A[i][1] [i] A i 1 2.0 A[i+1][1] * 1.0 A[i+1][1] [i+1] A i+1 i 1 1 1.0 3 t = ((A[i][0] * 1.0 + A[i+1][0] * 2.0)/3, (A[i][1] * 1.0 + A[i+1][1] * 2.0)/3) t ((A[i][0] * 1.0 + A[i+1][0] * 2.0)/3, (A[i][1] * 1.0 + A[i+1][1] * 2.0)/3) (A[i][0] * 1.0 + A[i+1][0] * 2.0)/3 A[i][0] * 1.0 + A[i+1][0] * 2.0 A[i][0] * 1.0 A[i][0] [i] A i 0 1.0 A[i+1][0] * 2.0 A[i+1][0] [i+1] A i+1 i 1 0 2.0 3 (A[i][1] * 1.0 + A[i+1][1] * 2.0)/3 A[i][1] * 1.0 + A[i+1][1] * 2.0 A[i][1] * 1.0 A[i][1] [i] A i 1 1.0 A[i+1][1] * 2.0 A[i+1][1] [i+1] A i+1 i 1 1 2.0 3 x = t[0] - s[0] x t[0] - s[0] t[0] t 0 s[0] s 0 y = t[1] - s[1] y t[1] - s[1] t[1] t 1 s[1] s 1 rad = math.radians(60) rad math.radians(60) math.radians math radians 60 ux = x * math.cos(rad) - y * math.sin(rad) ux x * math.cos(rad) - y * math.sin(rad) x * math.cos(rad) x math.cos(rad) math.cos math cos rad y * math.sin(rad) y math.sin(rad) math.sin math sin rad uy = x * math.sin(rad) + y * math.cos(rad) uy x * math.sin(rad) + y * math.cos(rad) x * math.sin(rad) x math.sin(rad) math.sin math sin rad y * math.cos(rad) y math.cos(rad) math.cos math cos rad u = (ux + s[0], uy + s[1]) u (ux + s[0], uy + s[1]) ux + s[0] ux s[0] s 0 uy + s[1] uy s[1] s 1 B.extend([p1, s, u, t]) B.extend B extend [p1, s, u, t] p1 s u t B.append(A[len(A)-1]) B.append B append A[len(A)-1] A len(A)-1 len(A) len A 1 return B B A A n = int(raw_input()) n int(raw_input()) int raw_input() raw_input A = [(0, 0), (100, 0)] A [(0, 0), (100, 0)] (0, 0) 0 0 (100, 0) 100 0 for i in xrange(n):
    A = kochCurve(A) i xrange(n) xrange n A = kochCurve(A) A kochCurve(A) kochCurve A for x in A:
    print x[0], x[1] x A print x[0] x 0 x[1] x 1 A = [(0, 0), (100, 0)] [(0, 0), (100, 0)] A n = int(raw_input()) int(raw_input()) n A = kochCurve(A) kochCurve(A) A def kochCurve(A):
    B = []
    for i in xrange(len(A)-1):
        p1 = A[i]
        p2 = A[i+1]
        s = ((A[i][0] * 2.0 + A[i+1][0] * 1.0)/3, (A[i][1] * 2.0 + A[i+1][1] * 1.0)/3)
        t = ((A[i][0] * 1.0 + A[i+1][0] * 2.0)/3, (A[i][1] * 1.0 + A[i+1][1] * 2.0)/3)
        x = t[0] - s[0]
        y = t[1] - s[1]
        rad = math.radians(60)
        ux = x * math.cos(rad) - y * math.sin(rad)
        uy = x * math.sin(rad) + y * math.cos(rad)
        u = (ux + s[0], uy + s[1])
        B.extend([p1, s, u, t])
    B.append(A[len(A)-1])
    return B def kochCurve(A):
    B = []
    for i in xrange(len(A)-1):
        p1 = A[i]
        p2 = A[i+1]
        s = ((A[i][0] * 2.0 + A[i+1][0] * 1.0)/3, (A[i][1] * 2.0 + A[i+1][1] * 1.0)/3)
        t = ((A[i][0] * 1.0 + A[i+1][0] * 2.0)/3, (A[i][1] * 1.0 + A[i+1][1] * 2.0)/3)
        x = t[0] - s[0]
        y = t[1] - s[1]
        rad = math.radians(60)
        ux = x * math.cos(rad) - y * math.sin(rad)
        uy = x * math.sin(rad) + y * math.cos(rad)
        u = (ux + s[0], uy + s[1])
        B.extend([p1, s, u, t])
    B.append(A[len(A)-1])
    return B kochCurve
import math
def kochCurve(A):
    B = []
    for i in xrange(len(A)-1):
        p1 = A[i]
        p2 = A[i+1]
        s = ((A[i][0] * 2.0 + A[i+1][0] * 1.0)/3, (A[i][1] * 2.0 + A[i+1][1] * 1.0)/3)
        t = ((A[i][0] * 1.0 + A[i+1][0] * 2.0)/3, (A[i][1] * 1.0 + A[i+1][1] * 2.0)/3)
        x = t[0] - s[0]
        y = t[1] - s[1]
        rad = math.radians(60)
        ux = x * math.cos(rad) - y * math.sin(rad)
        uy = x * math.sin(rad) + y * math.cos(rad)
        u = (ux + s[0], uy + s[1])
        B.extend([p1, s, u, t])
    B.append(A[len(A)-1])
    return B

n = int(raw_input())
A = [(0, 0), (100, 0)]
for i in xrange(n):
    A = kochCurve(A)
for x in A:
    print x[0], x[1]