class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.u: E = None
        self.r: C = None
        self.s: D = None
        self.o: F = None
        self.w: C = None
        self.p: E = None
        self.t: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.z: F = None
        self.r: E = None
        self.t: F = None
        self.v: D = None
        self.y: H = None
        self.p: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.u: G = None
        self.y: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.x: G = None
        self.y: G = None
        self.s: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: C = None
        self.u: F = None
        self.r: H = None
        self.y: F = None
        self.v: H = None
        self.o: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.x: D = None
        self.q: E = None
        self.txt = txt

n = A("n")
e = B("e")
h = C("h")
d = D("d")
c = E("c")
k = F("k")
m = G("m")
f = H("f")
j = E("j")

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

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

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.z: F = None
        self.r: E = None
        self.t: F = None
        self.v: D = None
        self.y: H = None
        self.p: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.u: G = None
        self.y: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.x: G = None
        self.y: G = None
        self.s: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: C = None
        self.u: F = None
        self.r: H = None
        self.y: F = None
        self.v: H = None
        self.o: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.x: D = None
        self.q: E = None
        self.txt = txt

n = A("n")
e = B("e")
h = C("h")
d = D("d")
c = E("c")
k = F("k")
m = G("m")
f = H("f")
j = E("j")

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