class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: E = None
        self.s: I = None
        self.u: G = None
        self.t: E = None
        self.o: G = None
        self.p: E = None
        self.v: G = None
        self.z: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.o: E = None
        self.v: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.y: F = None
        self.q: F = None
        self.v: D = None
        self.t: H = None
        self.p: I = None
        self.o: D = None
        self.x: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.x: F = None
        self.z: C = None
        self.y: B = None
        self.w: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.s: B = None
        self.t: A = None
        self.o: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: E = None
        self.q: D = None
        self.z: F = None
        self.s: G = None
        self.v: D = None
        self.u: C = None
        self.o: F = None
        self.p: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.o: E = None
        self.v: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.y: F = None
        self.q: F = None
        self.v: D = None
        self.t: H = None
        self.p: I = None
        self.o: D = None
        self.x: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.x: F = None
        self.z: C = None
        self.y: B = None
        self.w: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.s: B = None
        self.t: A = None
        self.o: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: E = None
        self.q: D = None
        self.z: F = None
        self.s: G = None
        self.v: D = None
        self.u: C = None
        self.o: F = None
        self.p: D = None
        self.txt = txt

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

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