class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.y: B = None
        self.o: D = None
        self.s: D = None
        self.x: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: D = None
        self.q: F = None
        self.o: D = None
        self.z: B = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: D = None
        self.q: F = None
        self.o: D = None
        self.z: B = None
        self.txt = txt

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

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

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

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