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

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.s: D = None
        self.o: C = None
        self.y: D = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.s: D = None
        self.o: C = None
        self.y: D = None
        self.txt = txt

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

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

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

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

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

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