class A:
    def __init__(self, txt: str):
        self.o: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.u: G = None
        self.p: D = None
        self.t: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: I = None
        self.v: H = None
        self.z: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.z: H = None
        self.y: E = None
        self.q: H = None
        self.r: F = None
        self.p: I = None
        self.o: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: C = None
        self.r: I = None
        self.v: E = None
        self.z: E = None
        self.s: C = None
        self.u: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.u: G = None
        self.p: D = None
        self.t: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: I = None
        self.v: H = None
        self.z: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.z: H = None
        self.y: E = None
        self.q: H = None
        self.r: F = None
        self.p: I = None
        self.o: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: C = None
        self.r: I = None
        self.v: E = None
        self.z: E = None
        self.s: C = None
        self.u: D = None
        self.txt = txt

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

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