class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.w: G = None
        self.o: C = None
        self.r: F = None
        self.x: B = None
        self.q: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: F = None
        self.t: C = None
        self.r: F = None
        self.q: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: F = None
        self.r: F = None
        self.q: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: F = None
        self.p: H = None
        self.u: G = None
        self.z: B = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: F = None
        self.t: C = None
        self.r: F = None
        self.q: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: F = None
        self.r: F = None
        self.q: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: F = None
        self.p: H = None
        self.u: G = None
        self.z: B = None
        self.txt = txt

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

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

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

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

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