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

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.w: A = None
        self.q: C = None
        self.t: F = 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.u: D = None
        self.w: C = None
        self.v: A = None
        self.p: E = None
        self.z: B = None
        self.t: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: D = None
        self.q: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: G = None
        self.x: B = None
        self.s: H = None
        self.r: B = None
        self.v: F = None
        self.o: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.w: A = None
        self.q: C = None
        self.t: F = 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.u: D = None
        self.w: C = None
        self.v: A = None
        self.p: E = None
        self.z: B = None
        self.t: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: D = None
        self.q: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: G = None
        self.x: B = None
        self.s: H = None
        self.r: B = None
        self.v: F = None
        self.o: G = None
        self.txt = txt

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

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