from turtle import *
def koch(bok, n):
if n == 0:
fd(bok)
return
koch(bok/3, n - 1)
lt(60)
koch(bok/3, n - 1)
rt(120)
koch(bok/3, n - 1)
lt(60)
koch(bok/3, n - 1)
ZnJvbSB0dXJ0bGUgaW1wb3J0ICoKCmRlZiBrb2NoKGJvaywgbik6CglpZiBuID09IDA6CgkJZmQoYm9rKQoJCXJldHVybiAKCWtvY2goYm9rLzMsIG4gLSAxKQoJbHQoNjApCglrb2NoKGJvay8zLCBuIC0gMSkKCXJ0KDEyMCkKCWtvY2goYm9rLzMsIG4gLSAxKQoJbHQoNjApCglrb2NoKGJvay8zLCBuIC0gMSk=