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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.v: A = None
        self.q: A = None
        self.u: G = None
        self.p: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.r: B = None
        self.q: G = None
        self.y: B = None
        self.v: A = None
        self.z: A = None
        self.t: G = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.v: A = None
        self.q: A = None
        self.u: G = None
        self.p: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.r: B = None
        self.q: G = None
        self.y: B = None
        self.v: A = None
        self.z: A = None
        self.t: G = None
        self.txt = txt

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

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

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

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

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