class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.t: G = None
        self.y: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: F = None
        self.x: A = None
        self.v: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.u: A = None
        self.x: C = None
        self.p: D = None
        self.q: C = None
        self.s: H = None
        self.y: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: D = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: F = None
        self.x: A = None
        self.v: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.u: A = None
        self.x: C = None
        self.p: D = None
        self.q: C = None
        self.s: H = None
        self.y: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: D = None
        self.txt = txt

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

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