class A:
    def __init__(self, txt: str):
        self.x: I = None
        self.t: B = None
        self.q: F = None
        self.p: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.t: B = None
        self.u: I = None
        self.w: E = None
        self.z: E = None
        self.y: G = None
        self.x: G = None
        self.v: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: C = None
        self.o: H = None
        self.txt = txt

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

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.t: B = None
        self.u: I = None
        self.w: E = None
        self.z: E = None
        self.y: G = None
        self.x: G = None
        self.v: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: C = None
        self.o: H = None
        self.txt = txt

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

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

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

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

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

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

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