class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.r: F = None
        self.t: G = None
        self.u: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: G = None
        self.r: H = None
        self.o: F = None
        self.z: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: D = None
        self.w: D = None
        self.z: E = None
        self.s: D = None
        self.q: C = None
        self.t: E = 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.v: G = None
        self.r: E = None
        self.w: F = None
        self.p: B = None
        self.y: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: H = None
        self.q: E = None
        self.o: B = None
        self.s: B = None
        self.t: F = None
        self.w: D = None
        self.z: D = None
        self.p: A = None
        self.y: A = None
        self.txt = txt

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

m.o = g
m.r = g
m.t = b
m.u = h
c.o = e
c.s = g
c.w = h
c.y = b
d.u = j
d.w = e
h.p = f
h.u = b
h.r = j
h.o = g
h.z = m
f.q = m
f.s = c
g.o = c
g.u = h
g.w = h
g.s = h
g.z = f
g.t = f
g.q = d
b.x = d
j.v = b
j.r = f
j.w = g
j.p = c
j.y = c
e.r = j
e.q = f
e.o = c
e.s = c
e.t = g
e.w = h
e.z = h
e.p = m
e.y = m
assert c.o.t.u.txt == "
class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.r: F = None
        self.t: G = None
        self.u: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: G = None
        self.r: H = None
        self.o: F = None
        self.z: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: D = None
        self.w: D = None
        self.z: E = None
        self.s: D = None
        self.q: C = None
        self.t: E = 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.v: G = None
        self.r: E = None
        self.w: F = None
        self.p: B = None
        self.y: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: H = None
        self.q: E = None
        self.o: B = None
        self.s: B = None
        self.t: F = None
        self.w: D = None
        self.z: D = None
        self.p: A = None
        self.y: A = None
        self.txt = txt

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

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