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

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

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: J = None
        self.z: D = None
        self.r: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: G = None
        self.x: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: J = None
        self.z: D = None
        self.r: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: G = None
        self.x: A = None
        self.txt = txt

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

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