class A:
    def __init__(self, txt: str):
        self.y: G = None
        self.p: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: J = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.p: C = None
        self.o: D = None
        self.t: C = None
        self.v: A = None
        self.u: D = None
        self.q: D = None
        self.x: A = None
        self.z: F = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: J = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.p: C = None
        self.o: D = None
        self.t: C = None
        self.v: A = None
        self.u: D = None
        self.q: D = None
        self.x: A = None
        self.z: F = None
        self.txt = txt

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

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

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