class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: J = None
        self.s: B = None
        self.o: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: I = None
        self.p: A = None
        self.z: I = None
        self.x: J = None
        self.w: F = None
        self.q: B = None
        self.u: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: I = None
        self.s: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.o: B = None
        self.u: B = None
        self.z: E = None
        self.v: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: J = None
        self.u: D = None
        self.y: H = None
        self.p: E = None
        self.v: D = None
        self.r: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.p: A = None
        self.u: I = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: I = None
        self.p: A = None
        self.z: I = None
        self.x: J = None
        self.w: F = None
        self.q: B = None
        self.u: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: I = None
        self.s: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.o: B = None
        self.u: B = None
        self.z: E = None
        self.v: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: J = None
        self.u: D = None
        self.y: H = None
        self.p: E = None
        self.v: D = None
        self.r: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.p: A = None
        self.u: I = None
        self.txt = txt

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

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