import math

def kochCurve(p1, p2, n):
    if n == 0:
        print "%5f %5f" % (p2[0], p2[1])
        return

    s = ((p2[0] - p1[0]) / 3.0 + p1[0], (p2[1] - p1[1]) / 3.0 + p1[1])
    t = ((p2[0] - p1[0]) * 2.0 / 3 + p1[0], (p2[1] - p1[1]) * 2.0 / 3 + p1[1])
    u = (math.cos(math.pi/3)*(t[0]-s[0])-math.sin(math.pi/3)*(t[1]-s[1])+s[0], math.sin(math.pi/3)*(t[0]-s[0])+math.cos(math.pi/3)*(t[1]-s[1])+s[1])

    kochCurve(p1, s, n - 1)
    kochCurve(s, u, n - 1)
    kochCurve(u, t, n - 1)
    kochCurve(t, p2, n - 1)

if __name__ == "__main__":
    n = int(input())
    p1 = (0, 0)
    p2 = (100, 0)
    print "%5f %5f" % (p1[0], p1[1])
    kochCurve(p1, p2, n) import math math def kochCurve(p1, p2, n):
    if n == 0:
        print "%5f %5f" % (p2[0], p2[1])
        return

    s = ((p2[0] - p1[0]) / 3.0 + p1[0], (p2[1] - p1[1]) / 3.0 + p1[1])
    t = ((p2[0] - p1[0]) * 2.0 / 3 + p1[0], (p2[1] - p1[1]) * 2.0 / 3 + p1[1])
    u = (math.cos(math.pi/3)*(t[0]-s[0])-math.sin(math.pi/3)*(t[1]-s[1])+s[0], math.sin(math.pi/3)*(t[0]-s[0])+math.cos(math.pi/3)*(t[1]-s[1])+s[1])

    kochCurve(p1, s, n - 1)
    kochCurve(s, u, n - 1)
    kochCurve(u, t, n - 1)
    kochCurve(t, p2, n - 1) kochCurve if n == 0:
        print "%5f %5f" % (p2[0], p2[1])
        return

     n == 0 n 0 print "%5f %5f" % (p2[0], p2[1]) "%5f %5f" (p2[0], p2[1]) p2[0] p2 0 p2[1] p2 1 return s = ((p2[0] - p1[0]) / 3.0 + p1[0], (p2[1] - p1[1]) / 3.0 + p1[1]) s ((p2[0] - p1[0]) / 3.0 + p1[0], (p2[1] - p1[1]) / 3.0 + p1[1]) (p2[0] - p1[0]) / 3.0 + p1[0] (p2[0] - p1[0]) / 3.0 p2[0] - p1[0] p2[0] p2 0 p1[0] p1 0 3.0 p1[0] p1 0 (p2[1] - p1[1]) / 3.0 + p1[1] (p2[1] - p1[1]) / 3.0 p2[1] - p1[1] p2[1] p2 1 p1[1] p1 1 3.0 p1[1] p1 1 t = ((p2[0] - p1[0]) * 2.0 / 3 + p1[0], (p2[1] - p1[1]) * 2.0 / 3 + p1[1]) t ((p2[0] - p1[0]) * 2.0 / 3 + p1[0], (p2[1] - p1[1]) * 2.0 / 3 + p1[1]) (p2[0] - p1[0]) * 2.0 / 3 + p1[0] (p2[0] - p1[0]) * 2.0 / 3 (p2[0] - p1[0]) * 2.0 p2[0] - p1[0] p2[0] p2 0 p1[0] p1 0 2.0 3 p1[0] p1 0 (p2[1] - p1[1]) * 2.0 / 3 + p1[1] (p2[1] - p1[1]) * 2.0 / 3 (p2[1] - p1[1]) * 2.0 p2[1] - p1[1] p2[1] p2 1 p1[1] p1 1 2.0 3 p1[1] p1 1 u = (math.cos(math.pi/3)*(t[0]-s[0])-math.sin(math.pi/3)*(t[1]-s[1])+s[0], math.sin(math.pi/3)*(t[0]-s[0])+math.cos(math.pi/3)*(t[1]-s[1])+s[1]) u (math.cos(math.pi/3)*(t[0]-s[0])-math.sin(math.pi/3)*(t[1]-s[1])+s[0], math.sin(math.pi/3)*(t[0]-s[0])+math.cos(math.pi/3)*(t[1]-s[1])+s[1]) math.cos(math.pi/3)*(t[0]-s[0])-math.sin(math.pi/3)*(t[1]-s[1])+s[0] math.cos(math.pi/3)*(t[0]-s[0])-math.sin(math.pi/3)*(t[1]-s[1]) math.cos(math.pi/3)*(t[0]-s[0]) math.cos(math.pi/3) math.cos math cos math.pi/3 math.pi math pi 3 t[0]-s[0] t[0] t 0 s[0] s 0 math.sin(math.pi/3)*(t[1]-s[1]) math.sin(math.pi/3) math.sin math sin math.pi/3 math.pi math pi 3 t[1]-s[1] t[1] t 1 s[1] s 1 s[0] s 0 math.sin(math.pi/3)*(t[0]-s[0])+math.cos(math.pi/3)*(t[1]-s[1])+s[1] math.sin(math.pi/3)*(t[0]-s[0])+math.cos(math.pi/3)*(t[1]-s[1]) math.sin(math.pi/3)*(t[0]-s[0]) math.sin(math.pi/3) math.sin math sin math.pi/3 math.pi math pi 3 t[0]-s[0] t[0] t 0 s[0] s 0 math.cos(math.pi/3)*(t[1]-s[1]) math.cos(math.pi/3) math.cos math cos math.pi/3 math.pi math pi 3 t[1]-s[1] t[1] t 1 s[1] s 1 s[1] s 1 kochCurve(p1, s, n - 1) kochCurve p1 s n - 1 n 1 kochCurve(s, u, n - 1) kochCurve s u n - 1 n 1 kochCurve(u, t, n - 1) kochCurve u t n - 1 n 1 kochCurve(t, p2, n - 1) kochCurve t p2 n - 1 n 1 p1 p1 p2 p2 n n if __name__ == "__main__":
    n = int(input())
    p1 = (0, 0)
    p2 = (100, 0)
    print "%5f %5f" % (p1[0], p1[1])
    kochCurve(p1, p2, n) __name__ == "__main__" __name__ "__main__" n = int(input()) n int(input()) int input() input p1 = (0, 0) p1 (0, 0) 0 0 p2 = (100, 0) p2 (100, 0) 100 0 print "%5f %5f" % (p1[0], p1[1]) "%5f %5f" (p1[0], p1[1]) p1[0] p1 0 p1[1] p1 1 kochCurve(p1, p2, n) kochCurve p1 p2 n def kochCurve(p1, p2, n):
    if n == 0:
        print "%5f %5f" % (p2[0], p2[1])
        return

    s = ((p2[0] - p1[0]) / 3.0 + p1[0], (p2[1] - p1[1]) / 3.0 + p1[1])
    t = ((p2[0] - p1[0]) * 2.0 / 3 + p1[0], (p2[1] - p1[1]) * 2.0 / 3 + p1[1])
    u = (math.cos(math.pi/3)*(t[0]-s[0])-math.sin(math.pi/3)*(t[1]-s[1])+s[0], math.sin(math.pi/3)*(t[0]-s[0])+math.cos(math.pi/3)*(t[1]-s[1])+s[1])

    kochCurve(p1, s, n - 1)
    kochCurve(s, u, n - 1)
    kochCurve(u, t, n - 1)
    kochCurve(t, p2, n - 1) def kochCurve(p1, p2, n):
    if n == 0:
        print "%5f %5f" % (p2[0], p2[1])
        return

    s = ((p2[0] - p1[0]) / 3.0 + p1[0], (p2[1] - p1[1]) / 3.0 + p1[1])
    t = ((p2[0] - p1[0]) * 2.0 / 3 + p1[0], (p2[1] - p1[1]) * 2.0 / 3 + p1[1])
    u = (math.cos(math.pi/3)*(t[0]-s[0])-math.sin(math.pi/3)*(t[1]-s[1])+s[0], math.sin(math.pi/3)*(t[0]-s[0])+math.cos(math.pi/3)*(t[1]-s[1])+s[1])

    kochCurve(p1, s, n - 1)
    kochCurve(s, u, n - 1)
    kochCurve(u, t, n - 1)
    kochCurve(t, p2, n - 1) kochCurve n = int(input()) int(input()) n p2 = (100, 0) (100, 0) p2 p1 = (0, 0) (0, 0) p1
import math

def kochCurve(p1, p2, n):
    if n == 0:
        print "%5f %5f" % (p2[0], p2[1])
        return

    s = ((p2[0] - p1[0]) / 3.0 + p1[0], (p2[1] - p1[1]) / 3.0 + p1[1])
    t = ((p2[0] - p1[0]) * 2.0 / 3 + p1[0], (p2[1] - p1[1]) * 2.0 / 3 + p1[1])
    u = (math.cos(math.pi/3)*(t[0]-s[0])-math.sin(math.pi/3)*(t[1]-s[1])+s[0], math.sin(math.pi/3)*(t[0]-s[0])+math.cos(math.pi/3)*(t[1]-s[1])+s[1])

    kochCurve(p1, s, n - 1)
    kochCurve(s, u, n - 1)
    kochCurve(u, t, n - 1)
    kochCurve(t, p2, n - 1)

if __name__ == "__main__":
    n = int(input())
    p1 = (0, 0)
    p2 = (100, 0)
    print "%5f %5f" % (p1[0], p1[1])
    kochCurve(p1, p2, n)