class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: H = None
        self.z: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.q: D = None
        self.p: B = None
        self.v: H = None
        self.x: E = None
        self.u: H = None
        self.w: E = None
        self.r: I = None
        self.y: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: G = None
        self.s: A = None
        self.z: E = None
        self.w: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: D = None
        self.p: I = None
        self.y: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.z: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.y: A = None
        self.u: I = None
        self.s: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: H = None
        self.r: C = None
        self.x: E = None
        self.q: A = None
        self.p: A = None
        self.u: E = None
        self.t: H = None
        self.txt = txt

l = A("l")
c = B("c")
j = C("j")
g = D("g")
d = E("d")
b = F("b")
a = G("a")
h = H("h")
e = I("e")

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

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

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.q: D = None
        self.p: B = None
        self.v: H = None
        self.x: E = None
        self.u: H = None
        self.w: E = None
        self.r: I = None
        self.y: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: G = None
        self.s: A = None
        self.z: E = None
        self.w: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: D = None
        self.p: I = None
        self.y: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.z: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.y: A = None
        self.u: I = None
        self.s: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: H = None
        self.r: C = None
        self.x: E = None
        self.q: A = None
        self.p: A = None
        self.u: E = None
        self.t: H = None
        self.txt = txt

l = A("l")
c = B("c")
j = C("j")
g = D("g")
d = E("d")
b = F("b")
a = G("a")
h = H("h")
e = I("e")

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