class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.z: E = None
        self.v: F = None
        self.p: A = None
        self.t: E = None
        self.x: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.r: B = None
        self.q: A = None
        self.o: A = None
        self.txt = txt

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

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

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

m = A("m")
e = B("e")
c = C("c")
i = D("i")
h = E("h")
b = F("b")
l = B("l")

m.u = i
e.o = h
e.z = h
e.t = h
e.v = b
e.p = m
e.x = c
c.s = h
c.r = l
c.q = m
c.o = m
i.x = c
i.o = c
h.u = b
h.r = c
h.w = m
b.w = m
b.v = m
b.z = i
b.q = i
b.t = l
b.p = h
l.o = h
l.z = h
l.t = h
l.v = b
l.p = m
l.x = c
assert m.u.x.o.u.o.txt == "
class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.z: E = None
        self.v: F = None
        self.p: A = None
        self.t: E = None
        self.x: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.r: B = None
        self.q: A = None
        self.o: A = None
        self.txt = txt

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

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

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

m = A("m")
e = B("e")
c = C("c")
i = D("i")
h = E("h")
b = F("b")
l = B("l")

m.u = i
e.o = h
e.z = h
e.t = h
e.v = b
e.p = m
e.x = c
c.s = h
c.r = l
c.q = m
c.o = m
i.x = c
i.o = c
h.u = b
h.r = c
h.w = m
b.w = m
b.v = m
b.z = i
b.q = i
b.t = l
b.p = h
l.o = h
l.z = h
l.t = h
l.v = b
l.p = m
l.x = c
assert m.u.x.o.u.o.txt == "c"