class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.y: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.y: A = None
        self.w: F = None
        self.t: A = None
        self.s: D = None
        self.o: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: E = None
        self.q: F = None
        self.s: E = None
        self.o: B = None
        self.y: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: A = None
        self.q: A = None
        self.w: E = None
        self.txt = txt

f = A("f")
m = B("m")
j = C("j")
a = D("a")
i = E("i")
h = F("h")
l = E("l")
k = C("k")

f.z = h
m.x = f
m.y = h
j.p = a
j.s = a
j.y = f
j.t = f
j.w = h
j.o = k
a.x = l
i.t = l
i.s = l
i.q = h
i.o = m
i.y = m
h.t = l
h.x = f
h.q = f
h.w = i
l.t = i
l.s = i
l.q = h
l.o = m
l.y = m
k.p = a
k.s = a
k.y = f
k.t = f
k.w = h
k.o = j
assert k.o.t.z.t.txt == "
class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.y: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.y: A = None
        self.w: F = None
        self.t: A = None
        self.s: D = None
        self.o: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: E = None
        self.q: F = None
        self.s: E = None
        self.o: B = None
        self.y: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: A = None
        self.q: A = None
        self.w: E = None
        self.txt = txt

f = A("f")
m = B("m")
j = C("j")
a = D("a")
i = E("i")
h = F("h")
l = E("l")
k = C("k")

f.z = h
m.x = f
m.y = h
j.p = a
j.s = a
j.y = f
j.t = f
j.w = h
j.o = k
a.x = l
i.t = l
i.s = l
i.q = h
i.o = m
i.y = m
h.t = l
h.x = f
h.q = f
h.w = i
l.t = i
l.s = i
l.q = h
l.o = m
l.y = m
k.p = a
k.s = a
k.y = f
k.t = f
k.w = h
k.o = j
assert k.o.t.z.t.txt == "l"