class A:
    def __init__(self, txt: str):
        self.u: H = None
        self.o: G = None
        self.p: H = None
        self.z: G = None
        self.w: B = None
        self.x: C = None
        self.r: C = None
        self.s: H = None
        self.v: G = None
        self.t: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: J = None
        self.r: G = None
        self.x: D = None
        self.t: J = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.o: J = None
        self.v: F = None
        self.u: G = None
        self.p: J = None
        self.x: C = None
        self.r: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.u: B = None
        self.y: C = None
        self.t: G = None
        self.z: J = None
        self.o: C = None
        self.v: B = None
        self.r: B = None
        self.w: C = None
        self.p: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.w: F = None
        self.y: I = None
        self.z: H = None
        self.o: C = None
        self.v: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.p: J = None
        self.z: I = None
        self.s: F = None
        self.o: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: J = None
        self.r: H = None
        self.y: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: G = None
        self.t: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: J = None
        self.r: G = None
        self.x: D = None
        self.t: J = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.o: J = None
        self.v: F = None
        self.u: G = None
        self.p: J = None
        self.x: C = None
        self.r: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.u: B = None
        self.y: C = None
        self.t: G = None
        self.z: J = None
        self.o: C = None
        self.v: B = None
        self.r: B = None
        self.w: C = None
        self.p: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.w: F = None
        self.y: I = None
        self.z: H = None
        self.o: C = None
        self.v: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.p: J = None
        self.z: I = None
        self.s: F = None
        self.o: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: J = None
        self.r: H = None
        self.y: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: G = None
        self.t: F = None
        self.txt = txt

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

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