# from math import from tkinter import root Tk canv Canvas root width 75

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34``` ```from math import * from tkinter import * root = Tk() k = 3 canv = Canvas(root, width = 750, height = 750, bg = 'white') x1, y1 = map(int, input().split()) x2, y2 = map(int, input().split()) l = sqrt((x2 - x1)**2 + (y2 - y1)**2) def koka(x1, y1, x2, y2, k): if k == 0: return l = sqrt((x2 - x1)**2 + (y2 - y1)**2) h = l/(2*sqrt(3)) x3 = x1 + int((x2 - x1)/3) y3 = y1 + int((y2 - y1)/3) x4 = x1 + int(2*(x2 - x1)/3 + 0.5) y4 = y1 + int(2*(y2 - y1)/3 + 0.5) x5 = int((x2 + x1)/2 + h*((y2 - y1)/l)) y5 = int((y2 + y1)/2 - h*((x2 - x1)/l)) canv.create_line(x1, y1, x3, y3, width = 1) canv.create_line(x3, y3, x5, y5, width = 1) canv.create_line(x5, y5, x4, y4, width = 1, smooth = 1) canv.create_line(x4, y4, x2, y2, width = 1, smooth = 1) canv.create_line(x3, y3, x4, y4, width = 3, fill = 'white') koka(x1, y1, x3, y3, k - 1) koka(x3, y3, x5, y5, k - 1) koka(x5, y5, x4, y4, k - 1) koka(x4, y4, x2, y2, k - 1) koka(x1, y1, x2, y2, 5) canv.pack() root.mainloop() ```