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

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

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

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.y: G = None
        self.v: A = None
        self.r: H = None
        self.w: H = None
        self.o: A = None
        self.z: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.z: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.y: G = None
        self.v: A = None
        self.r: H = None
        self.w: H = None
        self.o: A = None
        self.z: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.z: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

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

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