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

class B:
    def __init__(self, txt: str):
        self.z: J = None
        self.r: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.w: H = None
        self.y: H = None
        self.v: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.u: J = None
        self.z: B = None
        self.p: H = None
        self.s: B = None
        self.w: H = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.z: B = None
        self.v: E = None
        self.r: J = None
        self.x: J = None
        self.t: D = None
        self.w: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: H = None
        self.x: H = None
        self.p: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: J = None
        self.r: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.w: H = None
        self.y: H = None
        self.v: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.u: J = None
        self.z: B = None
        self.p: H = None
        self.s: B = None
        self.w: H = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.z: B = None
        self.v: E = None
        self.r: J = None
        self.x: J = None
        self.t: D = None
        self.w: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: H = None
        self.x: H = None
        self.p: F = None
        self.txt = txt

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

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