class A:
    def __init__(self, txt: str):
        self.o: J = None
        self.x: D = None
        self.u: C = None
        self.z: B = None
        self.w: C = None
        self.s: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: A = None
        self.z: J = None
        self.p: C = None
        self.t: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: I = 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.w: I = None
        self.y: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.z: G = None
        self.t: F = None
        self.w: F = None
        self.p: H = None
        self.x: B = None
        self.r: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: H = None
        self.x: I = None
        self.v: H = None
        self.r: G = None
        self.w: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: A = None
        self.z: J = None
        self.p: C = None
        self.t: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: I = 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.w: I = None
        self.y: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.z: G = None
        self.t: F = None
        self.w: F = None
        self.p: H = None
        self.x: B = None
        self.r: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: H = None
        self.x: I = None
        self.v: H = None
        self.r: G = None
        self.w: A = None
        self.txt = txt

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

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