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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.w: D = None
        self.o: C = None
        self.z: C = None
        self.x: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.s: E = None
        self.w: F = None
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: F = None
        self.t: C = None
        self.v: D = None
        self.o: C = None
        self.w: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.x: D = None
        self.p: D = None
        self.o: D = None
        self.txt = txt

h = A("h")
m = B("m")
l = C("l")
j = D("j")
d = E("d")
b = F("b")
i = F("i")

h.z = i
h.y = b
h.p = m
m.u = j
m.w = j
m.x = j
m.o = l
m.z = l
l.q = m
l.s = d
l.z = d
l.w = b
j.t = m
d.u = j
d.v = j
d.s = b
d.t = l
d.o = l
d.w = l
b.y = j
b.x = j
b.p = j
b.o = j
i.y = j
i.x = j
i.p = j
i.o = j
assert m.o.s.s.p.t.w.txt == "
class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.y: F = None
        self.p: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.w: D = None
        self.o: C = None
        self.z: C = None
        self.x: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.s: E = None
        self.w: F = None
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: F = None
        self.t: C = None
        self.v: D = None
        self.o: C = None
        self.w: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.x: D = None
        self.p: D = None
        self.o: D = None
        self.txt = txt

h = A("h")
m = B("m")
l = C("l")
j = D("j")
d = E("d")
b = F("b")
i = F("i")

h.z = i
h.y = b
h.p = m
m.u = j
m.w = j
m.x = j
m.o = l
m.z = l
l.q = m
l.s = d
l.z = d
l.w = b
j.t = m
d.u = j
d.v = j
d.s = b
d.t = l
d.o = l
d.w = l
b.y = j
b.x = j
b.p = j
b.o = j
i.y = j
i.x = j
i.p = j
i.o = j
assert m.o.s.s.p.t.w.txt == "j"