class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.s: E = None
        self.y: F = None
        self.u: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: E = None
        self.w: C = None
        self.z: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: I = None
        self.z: B = None
        self.r: B = None
        self.t: G = None
        self.x: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: E = None
        self.w: C = None
        self.z: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: I = None
        self.z: B = None
        self.r: B = None
        self.t: G = None
        self.x: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

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

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