class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: E = None
        self.p: E = None
        self.s: I = None
        self.z: G = None
        self.w: H = None
        self.x: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: J = None
        self.u: G = None
        self.x: B = None
        self.t: B = None
        self.q: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.z: E = None
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: C = None
        self.t: C = None
        self.o: D = None
        self.x: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.o: B = None
        self.x: A = None
        self.t: H = None
        self.p: F = None
        self.z: H = None
        self.u: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: I = None
        self.t: I = None
        self.q: E = None
        self.s: G = None
        self.p: C = None
        self.w: B = None
        self.v: G = None
        self.r: B = None
        self.z: I = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: D = None
        self.p: H = None
        self.o: H = None
        self.u: I = None
        self.r: I = None
        self.t: E = None
        self.w: E = None
        self.z: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: J = None
        self.u: G = None
        self.x: B = None
        self.t: B = None
        self.q: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.z: E = None
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: C = None
        self.t: C = None
        self.o: D = None
        self.x: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.o: B = None
        self.x: A = None
        self.t: H = None
        self.p: F = None
        self.z: H = None
        self.u: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: I = None
        self.t: I = None
        self.q: E = None
        self.s: G = None
        self.p: C = None
        self.w: B = None
        self.v: G = None
        self.r: B = None
        self.z: I = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: D = None
        self.p: H = None
        self.o: H = None
        self.u: I = None
        self.r: I = None
        self.t: E = None
        self.w: E = None
        self.z: G = None
        self.txt = txt

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

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