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

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.x: A = None
        self.q: D = None
        self.o: A = None
        self.z: A = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.x: A = None
        self.q: D = None
        self.o: A = None
        self.z: A = None
        self.txt = txt

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

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

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

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

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

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