class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.y: I = None
        self.s: C = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.w: G = None
        self.v: H = None
        self.q: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: I = None
        self.v: H = None
        self.u: E = None
        self.p: C = None
        self.txt = txt

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

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.w: G = None
        self.v: H = None
        self.q: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: I = None
        self.v: H = None
        self.u: E = None
        self.p: C = None
        self.txt = txt

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

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

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

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