class A:
    def __init__(self, txt: str):
        self.z: J = None
        self.s: J = None
        self.u: H = None
        self.x: F = None
        self.t: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.v: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.q: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: J = None
        self.t: C = None
        self.y: I = None
        self.u: D = None
        self.v: B = None
        self.s: F = None
        self.o: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: F = None
        self.s: D = None
        self.y: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: A = None
        self.w: A = None
        self.s: E = None
        self.v: H = None
        self.o: G = None
        self.p: H = None
        self.z: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.v: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.q: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: J = None
        self.t: C = None
        self.y: I = None
        self.u: D = None
        self.v: B = None
        self.s: F = None
        self.o: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: F = None
        self.s: D = None
        self.y: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: A = None
        self.w: A = None
        self.s: E = None
        self.v: H = None
        self.o: G = None
        self.p: H = None
        self.z: E = None
        self.txt = txt

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

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