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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: C = None
        self.t: C = None
        self.s: C = None
        self.z: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.t: E = None
        self.w: B = None
        self.x: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.q: B = None
        self.v: F = None
        self.p: C = None
        self.w: A = None
        self.o: G = None
        self.s: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: F = None
        self.t: F = None
        self.x: C = None
        self.q: C = None
        self.p: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: C = None
        self.t: C = None
        self.s: C = None
        self.z: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.t: E = None
        self.w: B = None
        self.x: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.q: B = None
        self.v: F = None
        self.p: C = None
        self.w: A = None
        self.o: G = None
        self.s: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: F = None
        self.t: F = None
        self.x: C = None
        self.q: C = None
        self.p: E = None
        self.txt = txt

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

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