class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: E = None
        self.w: E = None
        self.v: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.o: B = None
        self.u: E = None
        self.y: I = None
        self.w: H = None
        self.t: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.s: H = None
        self.v: I = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.z: J = None
        self.t: C = None
        self.y: E = None
        self.u: F = None
        self.p: F = None
        self.x: H = None
        self.q: B = None
        self.w: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: D = None
        self.y: I = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.o: B = None
        self.u: E = None
        self.y: I = None
        self.w: H = None
        self.t: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.s: H = None
        self.v: I = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.z: J = None
        self.t: C = None
        self.y: E = None
        self.u: F = None
        self.p: F = None
        self.x: H = None
        self.q: B = None
        self.w: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: D = None
        self.y: I = None
        self.txt = txt

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

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