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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.y: C = None
        self.q: D = None
        self.s: I = None
        self.o: G = None
        self.u: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.o: E = None
        self.w: H = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: D = None
        self.x: A = None
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: I = None
        self.y: E = None
        self.v: D = None
        self.s: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.y: C = None
        self.q: D = None
        self.s: I = None
        self.o: G = None
        self.u: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.o: E = None
        self.w: H = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: D = None
        self.x: A = None
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: I = None
        self.y: E = None
        self.v: D = None
        self.s: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

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

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